store: clean up event.go, node.go and add tests
Updates IsCreated logic on event.go. Cleans up node.go and adds tests to it.
This commit is contained in:
@ -49,12 +49,7 @@ func (e *Event) IsCreated() bool {
|
||||
if e.Action == Create {
|
||||
return true
|
||||
}
|
||||
|
||||
if e.Action == Set && e.PrevNode == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
return e.Action == Set && e.PrevNode == nil
|
||||
}
|
||||
|
||||
func (e *Event) Index() uint64 {
|
||||
|
Reference in New Issue
Block a user