Skip to content

Commit 60237a7

Browse files
committed
vm: change evolve_state error
1 parent 5e366e2 commit 60237a7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vm/contract.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use std::fmt::{self, Debug, Display, Formatter};
2727
use std::num::NonZeroU32;
2828
use std::rc::Rc;
2929

30-
use amplify::confinement;
3130
use amplify::num::u24;
3231
use bp::{BlockHeight, Outpoint, Txid};
3332
use chrono::{MappedLocalTime, TimeZone, Utc};
@@ -540,10 +539,9 @@ pub trait ContractStateAccess: Debug {
540539

541540
pub trait ContractStateEvolve {
542541
type Context<'ctx>;
542+
type Error: std::error::Error;
543543
fn init(context: Self::Context<'_>) -> Self;
544-
// TODO: distinguish contract validation failure errors from connectivity
545-
// errors. Allow custom error types here.
546-
fn evolve_state(&mut self, op: OrdOpRef) -> Result<(), confinement::Error>;
544+
fn evolve_state(&mut self, op: OrdOpRef) -> Result<(), Self::Error>;
547545
}
548546

549547
pub struct VmContext<'op, S: ContractStateAccess> {

0 commit comments

Comments
 (0)