Skip to content

Conversation

@me020523
Copy link
Contributor

@me020523 me020523 commented Sep 3, 2019

add some unit tests for node.go

@@ -0,0 +1,78 @@
package trie
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+license

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

"github.com/ethereum/go-ethereum/rlp"
)

func newFullNode(v []byte) []interface{} {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the v is not used here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already fixed it.

rand.Read(elems)
decodeNode(hash, elems)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test seems useless, and it tests nothing, so i decide to delete it. already rollback.

@holiman
Copy link
Contributor

holiman commented Nov 5, 2019

Please also add back the deleted test

@holiman holiman merged commit 4f7b7f8 into ethereum:master Jan 7, 2020
@karalabe karalabe added this to the 1.9.10 milestone Jan 9, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
* add node.go unit test file node_test.go

* add node_test.go file license and rollback trie_test.go

* fix unused variable v

* trie: fix license year

Co-authored-by: Péter Szilágyi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants