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:
Henry de Valence 2020-09-10 10:18:05 -07:00
parent a1d3af9e9c
commit 2cbc60aeae
1 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,10 @@ static NO_COINBASE_STATE_TRANSCRIPT: Lazy<Vec<(zs::Request, Result<zs::Response,
let block = block_no_transactions();
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>)>> =