diff --git a/crates/composable-cow/src/poll.rs b/crates/composable-cow/src/poll.rs index 590549cc..f68eb5c7 100644 --- a/crates/composable-cow/src/poll.rs +++ b/crates/composable-cow/src/poll.rs @@ -71,9 +71,9 @@ pub enum Verdict { /// orderbook prepends `from` before settlement). signature: Bytes, /// Advisory Unix timestamp (seconds) the fork's generator hints - /// the next poll at. `0` when synthetic - the legacy adapter - /// has no such hint, so the submit path ignores it. - next_poll_timestamp: u64, + /// the next poll at. `None` when synthetic - the legacy adapter + /// has no such hint. + next_poll_timestamp: Option, }, /// Retry once the wall clock (Unix seconds, UTC) reaches /// `wait_until`. diff --git a/crates/composable-cow/tests/run.rs b/crates/composable-cow/tests/run.rs index b4b7e411..7466a7cd 100644 --- a/crates/composable-cow/tests/run.rs +++ b/crates/composable-cow/tests/run.rs @@ -134,7 +134,7 @@ fn ready_outcome(order: &GPv2OrderData) -> Verdict { Verdict::Post { order: Box::new(order.clone()), signature: hex!("c0ffeec0ffeec0ffee").to_vec().into(), - next_poll_timestamp: 0, + next_poll_timestamp: None, } } diff --git a/modules/twap-monitor/src/keeper.rs b/modules/twap-monitor/src/keeper.rs index e7719e8a..8168858f 100644 --- a/modules/twap-monitor/src/keeper.rs +++ b/modules/twap-monitor/src/keeper.rs @@ -327,14 +327,13 @@ fn poll_one( /// `Post { order, signature, .. }`. The wire format is the canonical /// Solidity return tuple `abi.encode(order, signature)`, so the /// two-tuple parameter decode lines up. The deployed 1.x contract -/// carries no next-poll hint, so `next_poll_timestamp` is synthetic -/// (`0`). +/// carries no next-poll hint, so `next_poll_timestamp` is `None`. fn decode_return(data: &[u8]) -> Option { let (order, signature) = <(GPv2OrderData, Bytes)>::abi_decode_params(data).ok()?; Some(Verdict::Post { order: Box::new(order), signature, - next_poll_timestamp: 0, + next_poll_timestamp: None, }) } @@ -569,7 +568,7 @@ mod tests { assert_eq!(o.sellToken, order.sellToken); assert_eq!(o.buyAmount, order.buyAmount); assert_eq!(s, sig); - assert_eq!(next_poll_timestamp, 0, "legacy path carries no hint"); + assert_eq!(next_poll_timestamp, None, "legacy path carries no hint"); } other => panic!("expected Post, got {other:?}"), }