Skip to content

Commit f51b5c7

Browse files
committed
Fix lints
1 parent 08299bc commit f51b5c7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

chains/solana/contracts/tests/ccip/ccip_router_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9437,6 +9437,7 @@ func TestCCIPRouter(t *testing.T) {
94379437
hash, err := ccip.HashAnyToSVMMessage(message, config.OnRampAddress, msgAccounts)
94389438
require.NoError(t, err)
94399439
root, err := ccip.MerkleFrom([][32]byte{[32]byte(hash)})
9440+
require.NoError(t, err)
94409441

94419442
commitReport := ccip_offramp.CommitInput{
94429443
MerkleRoot: &ccip_offramp.MerkleRoot{
@@ -9517,12 +9518,12 @@ func TestCCIPRouter(t *testing.T) {
95179518
// We now build a buffer for the report and CPI to the executor instead.
95189519

95199520
// Arbitrary number decided by the caller, as long as it's not repeated between reports.
9520-
bufferId := uint64(0)
9521+
bufferID := uint64(0)
95219522

9522-
bufferIdLE := common.Uint64ToLE(bufferId)
9523-
bufferPDA, _, _ := solana.FindProgramAddress([][]byte{[]byte("execution_buffer"), transmitter.PublicKey().Bytes(), bufferIdLE}, config.ExecutionBuffer)
9523+
bufferIDLittleEndian := common.Uint64ToLE(bufferID)
9524+
bufferPDA, _, _ := solana.FindProgramAddress([][]byte{[]byte("execution_buffer"), transmitter.PublicKey().Bytes(), bufferIDLittleEndian}, config.ExecutionBuffer)
95249525

9525-
bufferInitIx, err := execution_buffer.NewInitializeExecutionReportBufferInstruction(bufferId, bufferPDA, transmitter.PublicKey(), solana.SystemProgramID).ValidateAndBuild()
9526+
bufferInitIx, err := execution_buffer.NewInitializeExecutionReportBufferInstruction(bufferID, bufferPDA, transmitter.PublicKey(), solana.SystemProgramID).ValidateAndBuild()
95269527
require.NoError(t, err)
95279528
testutils.SendAndConfirm(ctx, t, solanaGoClient, []solana.Instruction{bufferInitIx}, transmitter, config.DefaultCommitment)
95289529

@@ -9533,13 +9534,13 @@ func TestCCIPRouter(t *testing.T) {
95339534

95349535
chunk := rawReport[i:end]
95359536

9536-
appendIx, err := execution_buffer.NewAppendExecutionReportDataInstruction(bufferId, chunk, bufferPDA, transmitter.PublicKey(), solana.SystemProgramID).ValidateAndBuild()
9537-
require.NoError(t, err)
9537+
appendIx, appendErr := execution_buffer.NewAppendExecutionReportDataInstruction(bufferID, chunk, bufferPDA, transmitter.PublicKey(), solana.SystemProgramID).ValidateAndBuild()
9538+
require.NoError(t, appendErr)
95389539
testutils.SendAndConfirm(ctx, t, solanaGoClient, []solana.Instruction{appendIx}, transmitter, config.DefaultCommitment)
95399540
}
95409541

95419542
raw2 := execution_buffer.NewManuallyExecuteBufferedInstruction(
9542-
bufferId,
9543+
bufferID,
95439544
[]byte{},
95449545
bufferPDA,
95459546
config.OfframpConfigPDA,

0 commit comments

Comments
 (0)