MCPcopy Create free account
hub / github.com/cowprotocol/services / winner_declared

Method winner_declared

crates/autopilot/src/run_loop.rs:1103–1108  ·  view source on GitHub ↗

Records when the winner is declared, acts as a proxy to the time at which we call `/settle` on solvers. Additionally it records more metrics around `/settle` see [`Metrics::record_settle_block_metrics`] for details.

(start_block: BlockInfo, current_block: &CurrentBlockWatcher)

Source from the content-addressed store, hash-verified

1101 /// metrics around `/settle` see [`Metrics::record_settle_block_metrics`]
1102 /// for details.
1103 fn winner_declared(start_block: BlockInfo, current_block: &CurrentBlockWatcher) {
1104 let elapsed = start_block.observed_at.elapsed();
1105 Self::get().winner_declared.observe(elapsed.as_secs_f64());
1106
1107 Self::record_settle_block_metrics(start_block, current_block);
1108 }
1109
1110 fn auction_ready(init_block_timestamp: Instant) {
1111 Self::get()

Callers

nothing calls this directly

Calls 3

elapsedMethod · 0.80
getFunction · 0.50
observeMethod · 0.45

Tested by

no test coverage detected