From d6a69fd294225e947be6092bfdba2168262ee18a Mon Sep 17 00:00:00 2001 From: gary rong Date: Wed, 30 Sep 2020 19:45:56 +0800 Subject: [PATCH] trie: polishes to trie committer (#21351) * trie: update tests to check commit integrity * trie: polish committer * trie: fix typo * trie: remove hasvalue notion According to the benchmarks, type assertion between the pointer and interface is extremely fast. BenchmarkIntmethod-12 1000000000 1.91 ns/op BenchmarkInterface-12 1000000000 2.13 ns/op BenchmarkTypeSwitch-12 1000000000 1.81 ns/op BenchmarkTypeAssertion-12 2000000000 1.78 ns/op So the overhead for asserting whether the shortnode has "valuenode" child is super tiny. No necessary to have another field. * trie: linter nitpicks Co-authored-by: Martin Holst Swende # Conflicts: # trie/committer.go # trie/hasher.go # trie/trie.go # trie/trie_test.go --- to-merge.txt | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/to-merge.txt b/to-merge.txt index 55d50b4b1..53fca2e94 100644 --- a/to-merge.txt +++ b/to-merge.txt @@ -384,53 +384,3 @@ Date: Wed Sep 30 19:49:20 2020 +0200 trie: add Commit-sequence tests for stacktrie commit (#21643) -commit 053ed9cc847647a9b3ef707d0efe7104c4ab2a4c -Author: Gary Rong -Date: Wed Sep 30 19:45:56 2020 +0800 - - trie: polishes to trie committer (#21351) - - * trie: update tests to check commit integrity - - * trie: polish committer - - * trie: fix typo - - * trie: remove hasvalue notion - - According to the benchmarks, type assertion between the pointer and - interface is extremely fast. - - BenchmarkIntmethod-12 1000000000 1.91 ns/op - BenchmarkInterface-12 1000000000 2.13 ns/op - BenchmarkTypeSwitch-12 1000000000 1.81 ns/op - BenchmarkTypeAssertion-12 2000000000 1.78 ns/op - - So the overhead for asserting whether the shortnode has "valuenode" - child is super tiny. No necessary to have another field. - - * trie: linter nitpicks - - Co-authored-by: Martin Holst Swende - -commit dad26582b6ec5e3870a27db9f25ad1743ae00cbf -Author: Martin Holst Swende -Date: Tue Sep 29 17:40:08 2020 +0200 - - accounts, signer: implement gnosis safe support (#21593) - - * accounts, signer: implement gnosis safe support - - * common/math: add type for marshalling big to dec - - * accounts, signer: properly sign gnosis requests - - * signer, clef: implement account_signGnosisTx - - * signer: fix auditlog print, change rpc-name (signGnosisTx to signGnosisSafeTx) - - * signer: pass validation-messages/warnings to the UI for gnonsis-safe txs - - * signer/core: minor change to validationmessages of typed data - -