consensus: fix block-not-in-state check in test
The state responds with Ok(None) when the block is not there, and Err(_) to indicate an error while looking.
This commit is contained in:
parent
a1d3af9e9c
commit
2cbc60aeae
|
@ -104,7 +104,10 @@ static NO_COINBASE_STATE_TRANSCRIPT: Lazy<Vec<(zs::Request, Result<zs::Response,
|
||||||
let block = block_no_transactions();
|
let block = block_no_transactions();
|
||||||
let hash = block.hash();
|
let hash = block.hash();
|
||||||
|
|
||||||
vec![(zs::Request::Block(hash.into()), Err(TransError::Any))]
|
vec![(
|
||||||
|
zs::Request::Block(hash.into()),
|
||||||
|
Ok(zs::Response::Block(None)),
|
||||||
|
)]
|
||||||
});
|
});
|
||||||
|
|
||||||
static STATE_VERIFY_TRANSCRIPT_GENESIS: Lazy<Vec<(zs::Request, Result<zs::Response, TransError>)>> =
|
static STATE_VERIFY_TRANSCRIPT_GENESIS: Lazy<Vec<(zs::Request, Result<zs::Response, TransError>)>> =
|
||||||
|
|
Loading…
Reference in New Issue