fast tests

This commit is contained in:
derpy-duck 2023-03-09 23:12:58 +00:00
parent 844a407a3f
commit e56a0521e9
1 changed files with 7 additions and 19 deletions

View File

@ -41,8 +41,7 @@ contract CoreRelayerDelivery is CoreRelayerGovernance {
internal internal
returns (bool forwardIsFunded) returns (bool forwardIsFunded)
{ {
DeliveryInstructionsContainer memory container = DeliveryInstructionsContainer memory container = decodeDeliveryInstructionsContainer(forwardInstruction.container);
decodeDeliveryInstructionsContainer(forwardInstruction.container);
// Add any additional funds which were passed in to the forward as msg.value // Add any additional funds which were passed in to the forward as msg.value
transactionFeeRefundAmount = transactionFeeRefundAmount + forwardInstruction.msgValue; transactionFeeRefundAmount = transactionFeeRefundAmount + forwardInstruction.msgValue;
@ -170,24 +169,13 @@ contract CoreRelayerDelivery is CoreRelayerGovernance {
status: status status: status
}); });
payRefunds( payRefunds(internalInstruction, relayerRefundAddress, transactionFeeRefundAmount, callToTargetContractSucceeded, forwardingRequest.isValid, forwardIsFunded);
internalInstruction,
relayerRefundAddress,
transactionFeeRefundAmount,
callToTargetContractSucceeded,
forwardingRequest.isValid,
forwardIsFunded
);
} }
function payRefunds( function payRefunds(DeliveryInstruction memory internalInstruction, address payable relayerRefundAddress, uint256 transactionFeeRefundAmount, bool callToTargetContractSucceeded, bool forwardingRequestExists, bool forwardWasFunded) internal {
DeliveryInstruction memory internalInstruction,
address payable relayerRefundAddress,
uint256 transactionFeeRefundAmount,
bool callToTargetContractSucceeded,
bool forwardingRequestExists,
bool forwardWasFunded
) internal {
// Amount of receiverValue that is refunded to the user (0 if the call to 'receiveWormholeMessages' did not revert, or the full receiverValue otherwise) // Amount of receiverValue that is refunded to the user (0 if the call to 'receiveWormholeMessages' did not revert, or the full receiverValue otherwise)
uint256 receiverValueRefundAmount = uint256 receiverValueRefundAmount =
(callToTargetContractSucceeded ? 0 : internalInstruction.receiverValueTarget); (callToTargetContractSucceeded ? 0 : internalInstruction.receiverValueTarget);