forked from TrueCloudLab/neoneo-go
*: use more efficient WriteBytes where appropriate
Before this patch on block import we could easily be spending more than 6 seconds out of 30 in Uint256 encoding for UnspentBalance, now it's completely off the radar.
This commit is contained in:
parent
e7687d620d
commit
844491d365
23 changed files with 40 additions and 40 deletions
|
@ -22,7 +22,7 @@ var _ payload.PrepareRequest = (*prepareRequest)(nil)
|
|||
func (p *prepareRequest) EncodeBinary(w *io.BinWriter) {
|
||||
w.WriteLE(p.timestamp)
|
||||
w.WriteLE(p.nonce)
|
||||
w.WriteBE(p.nextConsensus[:])
|
||||
w.WriteBytes(p.nextConsensus[:])
|
||||
w.WriteArray(p.transactionHashes)
|
||||
p.minerTx.EncodeBinary(w)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue