diff --git a/bmt/bmt.go b/bmt/bmt.go index aa36885769..96209519f9 100644 --- a/bmt/bmt.go +++ b/bmt/bmt.go @@ -234,8 +234,8 @@ func (t *Tree) Draw(hash []byte, d int) string { } row := fmt.Sprintf("%v: %v", len(hashes)-i-1, strings.Join(hash, del[:delsize])) rows = append(rows, row) - } + rows = append(rows, strings.Join(left, " ")) rows = append(rows, strings.Join(right, " ")) return strings.Join(rows, "\n") + "\n" @@ -413,7 +413,6 @@ func (ha *Hasher) Reset() { func (ha *Hasher) ResetWithLength(l []byte) { ha.Reset() ha.blockLength = l - } // Release gives back the Tree to the pool whereby it unlocks @@ -429,7 +428,6 @@ func (ha *Hasher) releaseTree() { } ha.pool.Release(ha.bmt) ha.bmt = nil - } ha.cur = 0 ha.segment = nil diff --git a/core/types/lending_signing.go b/core/types/lending_signing.go index cce6e607af..72a9eead94 100644 --- a/core/types/lending_signing.go +++ b/core/types/lending_signing.go @@ -200,7 +200,6 @@ func (lendingsign LendingTxSigner) Hash(tx *LendingTransaction) common.Hash { // Sender get signer from func (lendingsign LendingTxSigner) Sender(tx *LendingTransaction) (common.Address, error) { - message := crypto.Keccak256( []byte("\x19Ethereum Signed Message:\n32"), lendingsign.Hash(tx).Bytes(), diff --git a/p2p/server.go b/p2p/server.go index e95a6cc1f0..1818353927 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -307,7 +307,6 @@ func (srv *Server) PeerCount() int { // server is shut down. If the connection fails for any reason, the server will // attempt to reconnect the peer. func (srv *Server) AddPeer(node *discover.Node) { - select { case srv.addstatic <- node: case <-srv.quit: