Browse Source

rename statuses

pull/8158/head
William Banfield 3 years ago
parent
commit
4c5bcbb83a
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      abci/types/types.go
  2. +2
    -2
      internal/state/execution.go

+ 4
- 4
abci/types/types.go View File

@ -53,11 +53,11 @@ func (r ResponseQuery) IsErr() bool {
return r.Code != CodeTypeOK
}
func (r ResponsePrepareProposal) UnknownModifiedTx() bool {
func (r ResponsePrepareProposal) IsTxStatusUnknown() bool {
return r.ModifiedTxStatus == ResponsePrepareProposal_UNKNOWN
}
func (r ResponsePrepareProposal) TxModified() bool {
func (r ResponsePrepareProposal) IsTxStatusModified() bool {
return r.ModifiedTxStatus == ResponsePrepareProposal_MODIFIED
}
@ -69,8 +69,8 @@ func (r ResponseProcessProposal) IsStatusUnknown() bool {
return r.Status == ResponseProcessProposal_UNKNOWN
}
// IsUnknown returns true if Code is Unknown
func (r ResponseVerifyVoteExtension) IsUnknown() bool {
// IsStatusUnknown returns true if Code is Unknown
func (r ResponseVerifyVoteExtension) IsStatusUnknown() bool {
return r.Status == ResponseVerifyVoteExtension_UNKNOWN
}


+ 2
- 2
internal/state/execution.go View File

@ -140,11 +140,11 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
// purpose for now.
panic(err)
}
if rpp.UnknownModifiedTx() {
if rpp.IsTxStatusUnknown() {
panic(fmt.Sprintf("PrepareProposal responded with ModifiedTxStatus %s", rpp.ModifiedTxStatus.String()))
}
if !rpp.TxModified() {
if !rpp.IsTxStatusModified() {
return block, nil
}
txrSet := types.NewTxRecordSet(rpp.TxRecords)


Loading…
Cancel
Save