Skip to content
Snippets Groups Projects
Unverified Commit 21e70d6b authored by Wolfgang Welz's avatar Wolfgang Welz
Browse files

prevent short-circuit evaluation

parent 2119f233
Branches
Tags
No related merge requests found
...@@ -218,7 +218,10 @@ func (tangle *Tangle) isMessageSolid(msg *message.Message, msgMetadata *MessageM ...@@ -218,7 +218,10 @@ func (tangle *Tangle) isMessageSolid(msg *message.Message, msgMetadata *MessageM
return true return true
} }
return tangle.isMessageMarkedAsSolid(msg.TrunkId()) && tangle.isMessageMarkedAsSolid(msg.BranchId()) // as missing messages are requested in isMessageMarkedAsSolid, we want to prevent short-circuit evaluation
trunkSolid := tangle.isMessageMarkedAsSolid(msg.TrunkId())
branchSolid := tangle.isMessageMarkedAsSolid(msg.BranchId())
return trunkSolid && branchSolid
} }
// builds up a stack from the given message and tries to solidify into the present. // builds up a stack from the given message and tries to solidify into the present.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment