Skip to content

Commit

Permalink
reject to accept does not need req to accept (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
zupzup authored Feb 12, 2025
1 parent b0e8c88 commit cbf8fd1
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/service/bill_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1560,16 +1560,6 @@ impl BillService {
if blockchain.block_with_operation_code_exists(BillOpCode::Accept) {
return Err(Error::BillAlreadyAccepted);
}
// there has to be a request to accept block that is not expired
if let Some(req_to_accept) =
blockchain.get_last_version_block_with_op_code(BillOpCode::RequestToAccept)
{
if req_to_accept.timestamp + ACCEPT_DEADLINE_SECONDS < timestamp {
return Err(Error::RequestAlreadyExpired);
}
} else {
return Err(Error::BillWasNotRequestedToAccept);
}
}
BillOpCode::RejectToBuy => {
if let RecourseWaitingForPayment::Yes(_) = waiting_for_recourse {
Expand Down

0 comments on commit cbf8fd1

Please sign in to comment.