mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
55b2cbb74d
Now we have VerifyTx() and PoolTx() APIs that either verify transaction in isolation or verify it against the mempool (either the primary one or the one given) and then add it there. There is no possibility to check against the mempool, but not add a transaction to it, but I doubt we really need it. It allows to remove some duplication between old PoolTx and verifyTx where they both tried to check transaction against mempool (verifying first and then adding it). It also saves us utility token balance check because it's done by the mempool anyway and we no longer need to do that explicitly in verifyTx. It makes AddBlock() and verifyBlock() transaction's checks more correct, because previously they could miss that even though sender S has enough balance to pay for A, B or C, he can't pay for all of them. Caveats: * consensus is running concurrently to other processes, so things could change while verifyBlock() is iterating over transactions, this will be mitigated in subsequent commits Improves TPS value for single node by at least 11%. Fixes #667, fixes #668. |
||
---|---|---|
.. | ||
testdata | ||
block.go | ||
block_test.go | ||
cache.go | ||
cache_test.go | ||
change_view.go | ||
change_view_test.go | ||
commit.go | ||
commit_test.go | ||
consensus.go | ||
consensus_test.go | ||
crypto.go | ||
crypto_test.go | ||
payload.go | ||
payload_test.go | ||
prepare_request.go | ||
prepare_request_test.go | ||
prepare_response.go | ||
prepare_response_test.go | ||
recovery_message.go | ||
recovery_message_test.go | ||
recovery_request.go | ||
recovery_request_test.go |