forked from TrueCloudLab/frostfs-node
[#1689] linter: Fix staticcheck warning: 'could apply De Morgan's law'
Change-Id: Ife03172bad7d517dc99771250c3308a9fc0916b3 Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
2394ae6ce0
commit
dfdeedfc6f
2 changed files with 5 additions and 5 deletions
|
@ -199,8 +199,8 @@ func (p Preparator) validateNotaryRequest(nr *payload.P2PNotaryRequest) error {
|
|||
// neo-go API)
|
||||
//
|
||||
// this check prevents notary flow recursion
|
||||
if !(len(nr.MainTransaction.Scripts[1].InvocationScript) == 0 ||
|
||||
bytes.Equal(nr.MainTransaction.Scripts[1].InvocationScript, p.dummyInvocationScript)) { // compatibility with old version
|
||||
if len(nr.MainTransaction.Scripts[1].InvocationScript) != 0 &&
|
||||
!bytes.Equal(nr.MainTransaction.Scripts[1].InvocationScript, p.dummyInvocationScript) { // compatibility with old version
|
||||
return ErrTXAlreadyHandled
|
||||
}
|
||||
|
||||
|
@ -364,8 +364,8 @@ func (p Preparator) validateWitnesses(w []transaction.Witness, alphaKeys keys.Pu
|
|||
|
||||
// the last one must be a placeholder for notary contract witness
|
||||
last := len(w) - 1
|
||||
if !(len(w[last].InvocationScript) == 0 || // https://github.com/nspcc-dev/neo-go/pull/2981
|
||||
bytes.Equal(w[last].InvocationScript, p.dummyInvocationScript)) || // compatibility with old version
|
||||
if (len(w[last].InvocationScript) != 0 && // https://github.com/nspcc-dev/neo-go/pull/2981
|
||||
!bytes.Equal(w[last].InvocationScript, p.dummyInvocationScript)) || // compatibility with old version
|
||||
len(w[last].VerificationScript) != 0 {
|
||||
return errIncorrectNotaryPlaceholder
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue