File tree Expand file tree Collapse file tree 3 files changed +3
-15
lines changed
Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -193,11 +193,3 @@ func setupDiscovery(h host.Host) (closer func(), err error) {
193193type fakeSigner struct {
194194 signing.FakeBackend
195195}
196-
197- // MarshalPayloadForSigning marshals the given payload into the bytes that should be signed.
198- // This should usually call `Payload.MarshalForSigning(NetworkName)` except when testing as
199- // that method is slow (computes a merkle tree that's necessary for testing).
200- // Implementations must be safe for concurrent use.
201- func (fs * fakeSigner ) MarshalPayloadForSigning (nn gpbft.NetworkName , p * gpbft.Payload ) []byte {
202- return p .MarshalForSigning (nn )
203- }
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ type SigningMarshaler interface {
128128 // This should usually call `Payload.MarshalForSigning(NetworkName)` except when testing as
129129 // that method is slow (computes a merkle tree that's necessary for testing).
130130 // Implementations must be safe for concurrent use.
131+ // WARNING: the partial message code depends on the structure of signed payload
131132 MarshalPayloadForSigning (NetworkName , * Payload ) []byte
132133}
133134
Original file line number Diff line number Diff line change @@ -838,14 +838,9 @@ func (h *gpbftHost) saveDecision(decision *gpbft.Justification) (*certs.Finality
838838}
839839
840840// MarshalPayloadForSigning marshals the given payload into the bytes that should be signed.
841- // This should usually call `Payload.MarshalForSigning(NetworkName)` except when testing as
842- // that method is slow (computes a merkle tree that's necessary for testing).
841+ // This calls `Payload.MarshalForSigning(NetworkName)`
843842func (h * gpbftHost ) MarshalPayloadForSigning (nn gpbft.NetworkName , p * gpbft.Payload ) []byte {
844- if m , ok := h .verifier .(gpbft.SigningMarshaler ); ok {
845- return m .MarshalPayloadForSigning (nn , p )
846- } else {
847- return p .MarshalForSigning (nn )
848- }
843+ return p .MarshalForSigning (nn )
849844}
850845
851846// Verifies a signature for the given public key.
You can’t perform that action at this time.
0 commit comments