A very experimental PLC implementation which uses BFT consensus for decentralization

Correctly handle operations pointing to nullified prev

gbl08ma.com 02523b03 4806d0cc

verified
+3 -1
+3 -1
plc/operation_validator.go
··· 88 } 89 90 if entry.CID.String() == proposedPrev { 91 - // TODO confirm what should happen if proposedPrev points to a nullified operation. we should probably be ignoring nullified ops here, but confirm with the reference impl 92 proposedPrevOp = mo.Some(entry) 93 break 94 } else {
··· 88 } 89 90 if entry.CID.String() == proposedPrev { 91 + if entry.Nullified { 92 + return OperationEffects{}, stacktrace.Propagate(ErrInvalidPrev, "prev operation is nullified") 93 + } 94 proposedPrevOp = mo.Some(entry) 95 break 96 } else {