Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
p2p: Remove the assertion for the filter height
It is not clear to me when this happens, but based on how the sync function is written, there doesn't seem to be a reason to assert and fail. Additionally, when starting a new negotiation with a new peer, it appears to be quite common to receive a peer with a different height, which may be the incorrect one. The crash that I observe on my system is: ``` thread '<unnamed>' panicked at 'assertion failed: filter_height <= block_height', /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/p2p/src/fsm/cbfmgr.rs:853:9 stack backtrace: 0: rust_begin_unwind at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library/std/src/panicking.rs:577:5 1: core::panicking::panic_fmt at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library/core/src/panicking.rs:67:14 2: core::panicking::panic at /rustc/0599b6b931816ab46ab79072189075f543931cbd/library/core/src/panicking.rs:117:5 3: nakamoto_p2p::fsm::cbfmgr::FilterManager<F,U,C>::sync at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/p2p/src/fsm/cbfmgr.rs:853:9 4: nakamoto_p2p::fsm::cbfmgr::FilterManager<F,U,C>::idle at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/p2p/src/fsm/cbfmgr.rs:900:13 5: nakamoto_p2p::fsm::cbfmgr::FilterManager<F,U,C>::initialize at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/p2p/src/fsm/cbfmgr.rs:329:9 6: <nakamoto_p2p::fsm::StateMachine<T,F,P,C> as nakamoto_net::StateMachine>::initialize at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/p2p/src/fsm.rs:782:9 7: <nakamoto_client::service::Service<T,F,P,C> as nakamoto_net::StateMachine>::initialize at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/client/src/service.rs:86:9 8: <nakamoto_net_poll::reactor::Reactor<std::net::tcp::TcpStream,Id> as nakamoto_net::Reactor<Id>>::run at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/net/poll/src/reactor.rs:156:9 9: nakamoto_client::client::ClientRunner<R>::run at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/client/src/client.rs:183:9 10: nakamoto_client::client::Client<R>::run at /home/vincent/.cargo/git/checkouts/nakamoto-90f2d5c288bae2ec/17bbdab/client/src/client.rs:402:9 11: satoshi_nakamoto::Nakamoto::new::{{closure}} at /home/vincent/Github/coffee/satoshi/satoshi-nakamoto/src/lib.rs:41:45 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. 2023-04-06T16:54:52.509Z DEBUG plugin-satoshi_plugin: Err(PluginError { code: -1, msg: \"command channel disconnected\", data: None }) ``` Signed-off-by: Vincenzo Palazzo <[email protected]>
- Loading branch information