problem: returns processed json for block with tx, instead of original json

rel: #45
This commit is contained in:
Igor Artamonov
2020-11-30 19:40:56 -05:00
parent e09b7a4eee
commit cfd73119f6
5 changed files with 49 additions and 43 deletions

View File

@@ -21,5 +21,6 @@
"0xe589a39acea3091b584b650158d08b159aa07e97b8e8cddb8f81cb606e13382e"
],
"transactionsRoot": "0xc90078e2af52aef81815cb2a71c22ebd781dd658dd953d9df57f7769a0b2fe51",
"uncles": []
"uncles": [],
"testFoo": "bar"
}

View File

@@ -48,4 +48,26 @@ class StandardCallsSpec extends Specification {
}
act.error == null
}
def "returns original block json"() {
when:
def act = client.execute("eth_getBlockByNumber", ["0x100001", false])
then:
act.result != null
with(act.result) {
testFoo == "bar"
}
act.error == null
}
def "returns original block json with tx"() {
when:
def act = client.execute("eth_getBlockByNumber", ["0x100001", true])
then:
act.result != null
with(act.result) {
testFoo == "bar"
}
act.error == null
}
}