From 743983c82b601e200fa53d4aa8973f83ff628d29 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Wed, 12 Sep 2018 11:47:27 +0800 Subject: core: types: use []byte for block Payload type (#101) Change payload type to []byte instead of [][]byte to make it more generic. The user of the consensus core should marshal the payload into a byte slice by themselves. --- core/interfaces.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/interfaces.go') diff --git a/core/interfaces.go b/core/interfaces.go index 080db20..c8f57e9 100644 --- a/core/interfaces.go +++ b/core/interfaces.go @@ -30,7 +30,7 @@ import ( // consensus core. type Application interface { // PreparePayload is called when consensus core is preparing a block. - PreparePayloads(position types.Position) [][]byte + PreparePayload(position types.Position) []byte // VerifyPayloads verifies if the payloads are valid. VerifyPayloads(payloads [][]byte) bool -- cgit v1.2.3