Jelajahi Sumber

tolerate unindex tx light client

fudongbai 4 tahun lalu
induk
melakukan
3d42dd1105
2 mengubah file dengan 1 tambahan dan 4 penghapusan
  1. 1 1
      core/state/snapshot/snapshot.go
  2. 0 3
      les/peer.go

+ 1 - 1
core/state/snapshot/snapshot.go

@@ -378,7 +378,7 @@ func (t *Tree) Cap(root common.Hash, layers int) error {
 		}
 		rebloom(persisted.root)
 	}
-	log.Info("Snapshot capped", "root", root)
+	log.Debug("Snapshot capped", "root", root)
 	return nil
 }
 

+ 0 - 3
les/peer.go

@@ -1043,9 +1043,6 @@ func (p *clientPeer) Handshake(td *big.Int, head common.Hash, headNum uint64, ge
 	if server.config.UltraLightOnlyAnnounce {
 		recentTx = txIndexDisabled
 	}
-	if recentTx != txIndexUnlimited && p.version < lpv4 {
-		return errors.New("Cannot serve old clients without a complete tx index")
-	}
 	// Note: clientPeer.headInfo should contain the last head announced to the client by us.
 	// The values announced in the handshake are dummy values for compatibility reasons and should be ignored.
 	p.headInfo = blockInfo{Hash: head, Number: headNum, Td: td}