diff --git a/core/store/changeset.go b/core/store/changeset.go index f521432ec6..b1233e8abf 100644 --- a/core/store/changeset.go +++ b/core/store/changeset.go @@ -20,7 +20,7 @@ type KVPairs = []KVPair // KVPair represents a change in a key and value of state. // Remove being true signals the key must be removed from state. -type KVPair struct { +type KVPair = struct { // Key defines the key being updated. Key []byte // Value defines the value associated with the updated key. diff --git a/schema/decoder.go b/schema/decoder.go index 86aedec9f9..fcebbf3d7b 100644 --- a/schema/decoder.go +++ b/schema/decoder.go @@ -27,14 +27,14 @@ type ModuleCodec struct { type KVDecoder = func(KVPairUpdate) ([]ObjectUpdate, error) // KVPairUpdate represents a key-value pair set or delete. -type KVPairUpdate struct { +type KVPairUpdate = struct { // Key is the key of the key-value pair. Key []byte - // Value is the value of the key-value pair. It should be ignored when Delete is true. + // Value is the value of the key-value pair. It should be ignored when Remove is true. Value []byte - // Delete is a flag that indicates that the key-value pair was deleted. If it is false, + // Remove is a flag that indicates that the key-value pair was deleted. If it is false, // then it is assumed that this has been a set operation. - Delete bool + Remove bool }