From f43ceabfb120213307bd0b3bbfeeded471043c85 Mon Sep 17 00:00:00 2001 From: Abdul Basit Date: Wed, 31 Jul 2024 00:12:37 +0500 Subject: [PATCH] getter and setter for auction results --- types/src/v0/impls/auction.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/types/src/v0/impls/auction.rs b/types/src/v0/impls/auction.rs index 1655e187d..916773c16 100644 --- a/types/src/v0/impls/auction.rs +++ b/types/src/v0/impls/auction.rs @@ -241,6 +241,22 @@ impl BidTx { } impl SolverAuctionResults { + pub fn new( + view_number: ViewNumber, + winning_bids: Vec, + reserve_bids: Vec<(NamespaceId, Url)>, + ) -> Self { + Self { + view_number, + winning_bids, + reserve_bids, + } + } + + pub fn view(&self) -> ViewNumber { + self.view_number + } + pub fn winning_bids(&self) -> &[BidTx] { &self.winning_bids }