Document a state_contains bug (#1715)
* Document a state_contains bug in the syncer and Inbound
This commit is contained in:
parent
0c5daa8410
commit
0b76352468
|
|
@ -172,6 +172,8 @@ where
|
||||||
|
|
||||||
let fut = async move {
|
let fut = async move {
|
||||||
// Check if the block is already in the state.
|
// Check if the block is already in the state.
|
||||||
|
// BUG: check if the hash is in any chain (#862).
|
||||||
|
// Depth only checks the main chain.
|
||||||
match state.oneshot(zs::Request::Depth(hash)).await {
|
match state.oneshot(zs::Request::Depth(hash)).await {
|
||||||
Ok(zs::Response::Depth(None)) => Ok(()),
|
Ok(zs::Response::Depth(None)) => Ok(()),
|
||||||
Ok(zs::Response::Depth(Some(_))) => Err("already present".into()),
|
Ok(zs::Response::Depth(Some(_))) => Err("already present".into()),
|
||||||
|
|
|
||||||
|
|
@ -620,7 +620,8 @@ where
|
||||||
/// Returns `true` if the hash is present in the state, and `false`
|
/// Returns `true` if the hash is present in the state, and `false`
|
||||||
/// if the hash is not present in the state.
|
/// if the hash is not present in the state.
|
||||||
///
|
///
|
||||||
/// TODO: handle multiple tips in the state.
|
/// BUG: check if the hash is in any chain (#862)
|
||||||
|
/// Depth only checks the main chain.
|
||||||
async fn state_contains(&mut self, hash: block::Hash) -> Result<bool, Report> {
|
async fn state_contains(&mut self, hash: block::Hash) -> Result<bool, Report> {
|
||||||
match self
|
match self
|
||||||
.state
|
.state
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue