mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-26 12:08:59 +00:00
fixes failed tx test
This commit is contained in:
parent
deb09f40f0
commit
ad1b27d2a4
@ -155,11 +155,3 @@ func skipNewBCTests*(folder: string, name: string): bool =
|
||||
]
|
||||
|
||||
result = name in allowedFailingBCTests
|
||||
|
||||
func skipTxTests*(folder: string, name: string): bool =
|
||||
# from test_transaction_json
|
||||
when sizeof(int) == 4:
|
||||
# see nim-eth#95
|
||||
result = name == "RLPHeaderSizeOverflowInt32.json"
|
||||
else:
|
||||
false
|
||||
|
@ -11,7 +11,7 @@ proc testFixture(node: JsonNode, testStatusIMPL: var TestStatus)
|
||||
|
||||
proc transactionJsonMain*() =
|
||||
suite "Transactions tests":
|
||||
jsonTest("TransactionTests", testFixture, skipTxTests)
|
||||
jsonTest("TransactionTests", testFixture)
|
||||
|
||||
when isMainModule:
|
||||
transactionJsonMain()
|
||||
@ -38,6 +38,10 @@ func noHash(fixture: JsonNode): bool =
|
||||
if forkData.len == 0: return
|
||||
if "hash" in forkData: return false
|
||||
|
||||
# nimbus rlp cannot allow type mismatch
|
||||
# e.g. uint256 value put into int64
|
||||
# so we skip noHash check. this behavior
|
||||
# is different compared to py-evm
|
||||
const SKIP_TITLES = [
|
||||
"TransactionWithGasLimitxPriceOverflow",
|
||||
"TransactionWithHighNonce256",
|
||||
@ -63,13 +67,7 @@ proc testFixture(node: JsonNode, testStatusIMPL: var TestStatus) =
|
||||
|
||||
try:
|
||||
tx = rlp.decode(rlpData, Transaction)
|
||||
except RlpTypeMismatch, MalformedRlpError:
|
||||
# TODO:
|
||||
# nimbus rlp cannot allow type mismatch
|
||||
# e.g. uint256 value put into int64
|
||||
# so we skip noHash check
|
||||
# this behavior different compared to
|
||||
# py-evm, not sure what should we do
|
||||
except RlpTypeMismatch, MalformedRlpError, UnsupportedRlpError:
|
||||
if title in SKIP_TITLES:
|
||||
return
|
||||
check noHash(fixture)
|
||||
|
Loading…
x
Reference in New Issue
Block a user