mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
cleanup
This commit is contained in:
parent
fe85196dd6
commit
bef40cd1ef
1 changed files with 1 additions and 6 deletions
|
|
@ -345,8 +345,7 @@ func (d *state) Reset() {
|
||||||
d.btree = BTree{count: 0, root: nil, rootHash: nil}
|
d.btree = BTree{count: 0, root: nil, rootHash: nil}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write absorbs more data into the hash's state. It produces an error
|
// Write absorbs more data into the hash's state.
|
||||||
// if more data is written to the ShakeHash after writing
|
|
||||||
func (d *state) Write(p []byte) (written int, err error) {
|
func (d *state) Write(p []byte) (written int, err error) {
|
||||||
tree, r, count, err1 := BuildBMT(hashFunc, p, 32)
|
tree, r, count, err1 := BuildBMT(hashFunc, p, 32)
|
||||||
d.btree = *tree
|
d.btree = *tree
|
||||||
|
|
@ -359,10 +358,6 @@ func (d *state) Write(p []byte) (written int, err error) {
|
||||||
return count, err
|
return count, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *state) Get(p []byte) (written int) {
|
|
||||||
return 3
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sum return the root hash of the BMT
|
// Sum return the root hash of the BMT
|
||||||
func (d *state) Sum(in []byte) []byte {
|
func (d *state) Sum(in []byte) []byte {
|
||||||
return d.root.Base
|
return d.root.Base
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue