Skip to content

Commit

Permalink
reflect review
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyungup committed Aug 13, 2020
1 parent 80e3278 commit ff22fd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blockchain/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var (

txPoolIsFullErr = fmt.Errorf("txpool is full")

errNotAllowedTx = errors.New("not allowed tx")
errNotAllowedAnchoringTx = errors.New("locally anchoring chaindata tx is not allowed in this node")
)

var (
Expand Down Expand Up @@ -952,7 +952,7 @@ func (pool *TxPool) handleTxMsg() {
// pricing constraints.
func (pool *TxPool) AddLocal(tx *types.Transaction) error {
if tx.Type().IsChainDataAnchoring() && !pool.config.AllowLocalAnchorTx {
return fmt.Errorf("tx type %v : %w", tx.Type().String(), errNotAllowedTx)
return errNotAllowedAnchoringTx
}

poolSize := uint64(len(pool.all))
Expand Down
2 changes: 1 addition & 1 deletion blockchain/tx_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func TestAnchorTransactions(t *testing.T) {
assert.NoError(t, err)

err = pool.AddLocal(tx2)
assert.Error(t, errNotAllowedTx, err)
assert.Error(t, errNotAllowedAnchoringTx, err)
}

// txPool which allow locally submitted anchor txs
Expand Down

0 comments on commit ff22fd7

Please sign in to comment.