Node/Watcher: Update solana min accounts check (#3367)
This commit is contained in:
parent
bd666ef076
commit
846deb2f40
|
@ -158,7 +158,7 @@ func (c ConsistencyLevel) Commitment() (rpc.CommitmentType, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
postMessageInstructionNumAccounts = 9
|
postMessageInstructionMinNumAccounts = 8
|
||||||
postMessageInstructionID = 0x01
|
postMessageInstructionID = 0x01
|
||||||
postMessageUnreliableInstructionID = 0x08
|
postMessageUnreliableInstructionID = 0x08
|
||||||
accountPrefixReliable = "msg"
|
accountPrefixReliable = "msg"
|
||||||
|
@ -609,9 +609,9 @@ func (s *SolanaWatcher) processInstruction(ctx context.Context, logger *zap.Logg
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(inst.Accounts) != postMessageInstructionNumAccounts {
|
if len(inst.Accounts) < postMessageInstructionMinNumAccounts {
|
||||||
return false, fmt.Errorf("invalid number of accounts: %d instead of %d",
|
return false, fmt.Errorf("invalid number of accounts: %d, must be at least %d",
|
||||||
len(inst.Accounts), postMessageInstructionNumAccounts)
|
len(inst.Accounts), postMessageInstructionMinNumAccounts)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode instruction data (UNTRUSTED)
|
// Decode instruction data (UNTRUSTED)
|
||||||
|
|
Loading…
Reference in New Issue