nervosnetwork / ckb-light-client

CKB light client reference implementation
MIT License
14 stars 16 forks source link

fix: limit the peer states which requires new last state #141

Closed yangby-cryptape closed 1 year ago

yangby-cryptape commented 1 year ago

Base on the design of state conversion as follows: https://github.com/nervosnetwork/ckb-light-client/blob/dfa4f43b191ca619642969b0a9d5a46f35cb8031/src/protocols/light_client/peers.rs#L76-L96

Only two peer states allow requesting new last state: https://github.com/nervosnetwork/ckb-light-client/blob/dfa4f43b191ca619642969b0a9d5a46f35cb8031/src/protocols/light_client/peers.rs#L881-L903