Skip to content

Conversation

@calvinlauyh
Copy link

@calvinlauyh calvinlauyh commented Apr 14, 2018

Description of the problem

When trying to call

@web3.eth.getBlockByNumber(3000000, full=false)

It returns error

NoMethodError (undefined method `each' for #<String:0x0000556be1cd9c20>)

Clause of problem

Block constructor attempts to convert each element in the array of transaction @transactions to Transaction objects. When full is false, @transactions is an array of transaction hashes string, and cause the error.

What I think is the correct behaviour?

It should not try to instantiate a Transaction but to leave the array of transaction hashes untouched.


p.s. This is my first time creating PR on other developer's repository and I am quite new to Ruby. Please let me know if I made something wrong and I am always willing to learn. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant