fix: MarshalRegistryEntry should optionally take pk so it can work both for marshall and signing
This commit is contained in:
parent
ad7880edbe
commit
4023d99838
|
@ -123,7 +123,10 @@ func MarshalSignedRegistryEntry(sre SignedRegistryEntry) []byte {
|
|||
func MarshalRegistryEntry(pk []byte, data []byte, revision uint64) []byte {
|
||||
var buffer []byte
|
||||
buffer = append(buffer, byte(types.RecordTypeRegistryEntry))
|
||||
|
||||
if pk != nil {
|
||||
buffer = append(buffer, pk...)
|
||||
}
|
||||
|
||||
revBytes := utils.EncodeEndian(revision, 8)
|
||||
buffer = append(buffer, revBytes...)
|
||||
|
|
Loading…
Reference in New Issue