Skip to content

Commit 677b84c

Browse files
committed
refactor!: rename RAVRequest with RavRequest
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent cd14047 commit 677b84c

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

tap_aggregator/src/aggregator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn check_and_aggregate_receipts(
4444
// Get the allocation id from the first receipt, return error if there are no receipts
4545
let allocation_id = match receipts.first() {
4646
Some(receipt) => receipt.message.allocation_id,
47-
None => return Err(tap_core::Error::NoValidReceiptsForRAVRequest.into()),
47+
None => return Err(tap_core::Error::NoValidReceiptsForRavRequest.into()),
4848
};
4949

5050
// Check that the receipts all have the same allocation id

tap_core/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub enum Error {
4646
AdapterError { source_error: anyhow::Error },
4747
/// Error when no valid receipts are found for a RAV request
4848
#[error("Failed to produce rav request, no valid receipts")]
49-
NoValidReceiptsForRAVRequest,
49+
NoValidReceiptsForRavRequest,
5050

5151
/// Error when the previous RAV allocation id does not match the allocation id from the new receipt
5252
#[error("Previous RAV allocation id ({prev_id}) doesn't match the allocation id from the new receipt ({new_id}).")]

tap_core/src/manager/tap_manager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use super::adapters::{
77
RAVRead, RAVStore, ReceiptDelete, ReceiptRead, ReceiptStore, SignatureChecker,
88
};
99
use crate::{
10-
rav::{RAVRequest, ReceiptAggregateVoucher, SignedRAV},
10+
rav::{RavRequest, ReceiptAggregateVoucher, SignedRAV},
1111
receipt::{
1212
checks::{CheckBatch, CheckList, TimestampCheck, UniqueCheck},
1313
state::{Checked, Failed},
@@ -188,7 +188,7 @@ where
188188
ctx: &Context,
189189
timestamp_buffer_ns: u64,
190190
receipts_limit: Option<u64>,
191-
) -> Result<RAVRequest<SignedReceipt>, Error> {
191+
) -> Result<RavRequest<SignedReceipt>, Error> {
192192
let previous_rav = self.get_previous_rav().await?;
193193
let min_timestamp_ns = previous_rav
194194
.as_ref()
@@ -201,7 +201,7 @@ where
201201

202202
let expected_rav = Self::generate_expected_rav(&valid_receipts, previous_rav.clone());
203203

204-
Ok(RAVRequest {
204+
Ok(RavRequest {
205205
valid_receipts,
206206
previous_rav,
207207
invalid_receipts,
@@ -214,7 +214,7 @@ where
214214
previous_rav: Option<SignedRAV>,
215215
) -> Result<ReceiptAggregateVoucher, Error> {
216216
if receipts.is_empty() {
217-
return Err(Error::NoValidReceiptsForRAVRequest);
217+
return Err(Error::NoValidReceiptsForRavRequest);
218218
}
219219
let allocation_id = receipts[0].signed_receipt().message.allocation_id;
220220
let receipts = receipts

tap_core/src/rav.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use crate::{receipt::Receipt, signed_message::EIP712SignedMessage, Error};
4848

4949
/// EIP712 signed message for ReceiptAggregateVoucher
5050
pub type SignedRAV = EIP712SignedMessage<ReceiptAggregateVoucher>;
51-
pub use request::RAVRequest;
51+
pub use request::RavRequest;
5252

5353
sol! {
5454
/// Holds information needed for promise of payment signed with ECDSA

tap_core/src/rav/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::{
1212

1313
/// Request to `tap_aggregator` to aggregate receipts into a Signed RAV.
1414
#[derive(Debug)]
15-
pub struct RAVRequest<Rcpt> {
15+
pub struct RavRequest<Rcpt> {
1616
/// List of checked and reserved receipts to aggregate
1717
pub valid_receipts: Vec<ReceiptWithState<Checked, Rcpt>>,
1818
/// Optional previous RAV to aggregate with

0 commit comments

Comments
 (0)