mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-27 04:26:07 +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
|
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*() =
|
proc transactionJsonMain*() =
|
||||||
suite "Transactions tests":
|
suite "Transactions tests":
|
||||||
jsonTest("TransactionTests", testFixture, skipTxTests)
|
jsonTest("TransactionTests", testFixture)
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
transactionJsonMain()
|
transactionJsonMain()
|
||||||
@ -38,6 +38,10 @@ func noHash(fixture: JsonNode): bool =
|
|||||||
if forkData.len == 0: return
|
if forkData.len == 0: return
|
||||||
if "hash" in forkData: return false
|
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 = [
|
const SKIP_TITLES = [
|
||||||
"TransactionWithGasLimitxPriceOverflow",
|
"TransactionWithGasLimitxPriceOverflow",
|
||||||
"TransactionWithHighNonce256",
|
"TransactionWithHighNonce256",
|
||||||
@ -63,13 +67,7 @@ proc testFixture(node: JsonNode, testStatusIMPL: var TestStatus) =
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
tx = rlp.decode(rlpData, Transaction)
|
tx = rlp.decode(rlpData, Transaction)
|
||||||
except RlpTypeMismatch, MalformedRlpError:
|
except RlpTypeMismatch, MalformedRlpError, UnsupportedRlpError:
|
||||||
# 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
|
|
||||||
if title in SKIP_TITLES:
|
if title in SKIP_TITLES:
|
||||||
return
|
return
|
||||||
check noHash(fixture)
|
check noHash(fixture)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user