hack/: fix linter warnings
This commit is contained in:
parent
28fb0f0ec8
commit
8f1ab74b53
|
@ -62,16 +62,16 @@ func main() {
|
|||
sequence := uint64(time.Now().Unix())
|
||||
timestamp := time.Now()
|
||||
|
||||
if !testSubmit(ctx, logger, gk, wormchainConn, contract, "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16", timestamp, sequence, true, false, "Submit should succeed") {
|
||||
if !testSubmit(ctx, logger, gk, wormchainConn, contract, "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16", timestamp, sequence, true, "Submit should succeed") {
|
||||
return
|
||||
}
|
||||
|
||||
if !testSubmit(ctx, logger, gk, wormchainConn, contract, "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16", timestamp, sequence, true, false, "Already commited should succeed") {
|
||||
if !testSubmit(ctx, logger, gk, wormchainConn, contract, "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16", timestamp, sequence, true, "Already commited should succeed") {
|
||||
return
|
||||
}
|
||||
|
||||
sequence += 10
|
||||
if !testSubmit(ctx, logger, gk, wormchainConn, contract, "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c17", timestamp, sequence, false, true, "Bad emitter address should fail") {
|
||||
if !testSubmit(ctx, logger, gk, wormchainConn, contract, "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c17", timestamp, sequence, false, "Bad emitter address should fail") {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,6 @@ func testSubmit(
|
|||
timestamp time.Time,
|
||||
sequence uint64,
|
||||
expectedResult bool,
|
||||
errorExpected bool,
|
||||
tag string,
|
||||
) bool {
|
||||
EmitterAddress, _ := vaa.StringToAddress(emitterAddressStr)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
//nolint:forcetypeassert //this is a hack
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -266,11 +266,13 @@ func process(txRpc *rpc.TransactionWithMeta) (*solana.PublicKey, error) {
|
|||
program, err := solana.PublicKeyFromBase58(*solanaAddr)
|
||||
if err != nil {
|
||||
log.Fatalf("Invalid program address: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tx, err := txRpc.GetTransaction()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to unmarshal transaction: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
signature := tx.Signatures[0]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
//nolint:noctx // this is a hack
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -401,7 +402,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if seq <= uint64(lowest) {
|
||||
if seq <= lowest {
|
||||
// We are done
|
||||
log.Println("Finished!")
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue