mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
fix tautological condition: nil == nil
This commit is contained in:
parent
371c3b6874
commit
5f66fb5de0
3 changed files with 3 additions and 3 deletions
|
|
@ -476,7 +476,7 @@ func (x *XDPoS_v1) snapshot(chain consensus.ChainReader, number uint64, hash com
|
|||
headers []*types.Header
|
||||
snap *SnapshotV1
|
||||
)
|
||||
for snap == nil {
|
||||
for {
|
||||
// If an in-memory SnapshotV1 was found, use that
|
||||
if s, ok := x.recents.Get(hash); ok {
|
||||
snap = s.(*SnapshotV1)
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ func (c *Clique) snapshot(chain consensus.ChainReader, number uint64, hash commo
|
|||
headers []*types.Header
|
||||
snap *Snapshot
|
||||
)
|
||||
for snap == nil {
|
||||
for {
|
||||
// If an in-memory snapshot was found, use that
|
||||
if s, ok := c.recents.Get(hash); ok {
|
||||
snap = s.(*Snapshot)
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ func (t *Trie) tryGetAllLeftKeyAndValue(origNode Node, prefix []byte, limit []by
|
|||
if err != nil {
|
||||
return nil, nil, n, false, err
|
||||
}
|
||||
if err == nil && didResolve {
|
||||
if didResolve {
|
||||
n = n.copy()
|
||||
n.Children[i] = newnode
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue