consensus: drop NextConsensus from the prepareRequest
Follow neo-project/neo#744 to make our requests compatible with C# node.
This commit is contained in:
parent
ae497228f0
commit
2278cd5700
5 changed files with 15 additions and 18 deletions
|
@ -11,7 +11,6 @@ type prepareRequest struct {
|
|||
timestamp uint64
|
||||
nonce uint64
|
||||
transactionHashes []util.Uint256
|
||||
nextConsensus util.Uint160
|
||||
}
|
||||
|
||||
var _ payload.PrepareRequest = (*prepareRequest)(nil)
|
||||
|
@ -20,7 +19,6 @@ var _ payload.PrepareRequest = (*prepareRequest)(nil)
|
|||
func (p *prepareRequest) EncodeBinary(w *io.BinWriter) {
|
||||
w.WriteU64LE(p.timestamp)
|
||||
w.WriteU64LE(p.nonce)
|
||||
w.WriteBytes(p.nextConsensus[:])
|
||||
w.WriteArray(p.transactionHashes)
|
||||
}
|
||||
|
||||
|
@ -28,7 +26,6 @@ func (p *prepareRequest) EncodeBinary(w *io.BinWriter) {
|
|||
func (p *prepareRequest) DecodeBinary(r *io.BinReader) {
|
||||
p.timestamp = r.ReadU64LE()
|
||||
p.nonce = r.ReadU64LE()
|
||||
r.ReadBytes(p.nextConsensus[:])
|
||||
r.ReadArray(&p.transactionHashes)
|
||||
}
|
||||
|
||||
|
@ -51,7 +48,7 @@ func (p *prepareRequest) TransactionHashes() []util.Uint256 { return p.transacti
|
|||
func (p *prepareRequest) SetTransactionHashes(hs []util.Uint256) { p.transactionHashes = hs }
|
||||
|
||||
// NextConsensus implements payload.PrepareRequest interface.
|
||||
func (p *prepareRequest) NextConsensus() util.Uint160 { return p.nextConsensus }
|
||||
func (p *prepareRequest) NextConsensus() util.Uint160 { return util.Uint160{} }
|
||||
|
||||
// SetNextConsensus implements payload.PrepareRequest interface.
|
||||
func (p *prepareRequest) SetNextConsensus(nc util.Uint160) { p.nextConsensus = nc }
|
||||
func (p *prepareRequest) SetNextConsensus(_ util.Uint160) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue