diff --git a/Makefile b/Makefile index e6e8bd2f8..f8c729918 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ GO_INSTALL := $(GO) install PROJECT_NAME := $(shell basename "$(PWD)") BUILDER_VERSION = 3.11.0 -VERSION = 3.11.1 +VERSION = 3.11.2 COMMIT = $(shell git rev-parse --short HEAD) PROJECT = github.com/iost-official/go-iost DOCKER_IMAGE = iostio/iost-node:$(VERSION)-$(COMMIT) diff --git a/core/txpool/tx_pool.go b/core/txpool/tx_pool.go index 6736df85e..198db7bc2 100644 --- a/core/txpool/tx_pool.go +++ b/core/txpool/tx_pool.go @@ -148,7 +148,7 @@ func (pool *TxPImpl) initBlockTx() { } func (pool *TxPImpl) verifyTx(t *tx.Tx) error { - isSimpleTransfer := len(t.Actions) == 1 && t.Actions[0].Contract == "token.iost" + isSimpleTransfer := len(t.Actions) == 1 && t.Actions[0].Contract == "token.iost" && len(t.Actions[0].Data) <= 70 if isSimpleTransfer { if pool.pendingTx.Size() > maxCacheTxs { return ErrCacheFull diff --git a/core/txpool/type.go b/core/txpool/type.go index 37efc7cd3..2fac8ba50 100644 --- a/core/txpool/type.go +++ b/core/txpool/type.go @@ -148,6 +148,14 @@ func compareTx(a, b any) int { txb := b.(*tx.Tx) isSimpleTransferA := len(txa.Actions) == 1 && txa.Actions[0].Contract == "token.iost" isSimpleTransferB := len(txb.Actions) == 1 && txb.Actions[0].Contract == "token.iost" + if isSimpleTransferA && isSimpleTransferB { + if len(txa.Actions[0].Data) < len(txb.Actions[0].Data) { + return 1 + } + if len(txa.Actions[0].Data) > len(txb.Actions[0].Data) { + return -1 + } + } if isSimpleTransferA && !isSimpleTransferB { return 1 }