Update panics by `todo!` and `unimplemented!` macros (#2471)
* Add panic message to `unimplemented!` So that it is clear why the panic happened upon initial inspection. Also include a reference to the mempool epic, so that it's easier to find the issue that tracks the implementation of the missing code. * Add panic message that references a tracking issue Make it easy to find the relevant issue if the panic occurs. * Remove incomplete and currently unnecessary code The current implementation works, the commented out code was just a previous improvement idea, which is now tracked by issue #2473.
This commit is contained in:
parent
40e350c342
commit
23fe2c2e94
|
@ -21,7 +21,7 @@ use super::super::{
|
|||
/// [poseidonhash]: https://zips.z.cash/protocol/nu5.pdf#poseidonhash
|
||||
fn poseidon_hash(_x: pallas::Base, _y: pallas::Base) -> pallas::Base {
|
||||
// TODO: implement: #2064
|
||||
unimplemented!()
|
||||
unimplemented!("PoseidonHash is not yet implemented (#2064)")
|
||||
}
|
||||
|
||||
/// Used as part of deriving the _nullifier_ for a Orchard _note_.
|
||||
|
|
|
@ -43,9 +43,6 @@ mod tests;
|
|||
pub struct Verifier<ZS> {
|
||||
network: Network,
|
||||
script_verifier: script::Verifier<ZS>,
|
||||
// spend_verifier: groth16::Verifier,
|
||||
// output_verifier: groth16::Verifier,
|
||||
// joinsplit_verifier: groth16::Verifier,
|
||||
}
|
||||
|
||||
impl<ZS> Verifier<ZS>
|
||||
|
@ -53,16 +50,10 @@ where
|
|||
ZS: Service<zs::Request, Response = zs::Response, Error = BoxError> + Send + Clone + 'static,
|
||||
ZS::Future: Send + 'static,
|
||||
{
|
||||
// XXX: how should this struct be constructed?
|
||||
pub fn new(network: Network, script_verifier: script::Verifier<ZS>) -> Self {
|
||||
// let (spend_verifier, output_verifier, joinsplit_verifier) = todo!();
|
||||
|
||||
Self {
|
||||
network,
|
||||
script_verifier,
|
||||
// spend_verifier,
|
||||
// output_verifier,
|
||||
// joinsplit_verifier,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +144,7 @@ where
|
|||
};
|
||||
if is_mempool {
|
||||
// XXX determine exactly which rules apply to mempool transactions
|
||||
unimplemented!();
|
||||
unimplemented!("Zebra does not yet have a mempool (#2309)");
|
||||
}
|
||||
|
||||
let script_verifier = self.script_verifier.clone();
|
||||
|
|
Loading…
Reference in New Issue