accounts/abi: allow interface as the destination#18490
accounts/abi: allow interface as the destination#18490gballet merged 1 commit intoethereum:masterfrom
Conversation
gballet
left a comment
There was a problem hiding this comment.
Those changes make sense. Have a look at the few nitpicks that I have.
There was a problem hiding this comment.
You're chaning what is being tested here. See https://play.golang.org/p/jVgSuTeE1Fr
I suggest that you add a separate test with []byte{} and in this case check that you are indeed getting the error that occurs when dst.Elem().IsValid() == false
There was a problem hiding this comment.
That's nice, and yet I would also like to see a test for what happens when the interface doesn't correspond do the types in def
|
This change fixes issue #18480 :) |
FetchContractData method as it can no longer take a pointer to an empty interface which was allowing to act completely generically in our Poller methods... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method as it can no longer take a pointer to an empty interface which was allowing to act completely generically in our Poller methods... fix provided in PR [#18490](ethereum/go-ethereum#18490)
bc70a8a to
9c4a95e
Compare
|
@gballet I moved the test cases into Since in the Please take another look. |
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
FetchContractData method in the context of our Poller as it can no longer take a pointer to an empty interface which allowed for generic handling of any return type... fix provided in PR [#18490](ethereum/go-ethereum#18490)
In this PR, interface as the abi unpack destination is allowed.
It means user could pass a pointer to an empty interface (v) to the
abi.Unpack(v interface{}, data []byte)method in order to unpack values returned from contract method calls without needing to know the type of the returned values beforehand(Copy from #18480 issue description).Also this PR fix #18480