mirror of
https://github.com/tendermint/tendermint.git
synced 2026-05-28 10:00:21 +00:00
use nil slice when expected length is 0
This commit is contained in:
@@ -224,7 +224,7 @@ func (rpp *ResponsePrepareProposal) IncludedTxs() []*TxRecord {
|
||||
// RemovedTxs returns all of the TxRecords that are marked for removal from the
|
||||
// mempool.
|
||||
func (rpp *ResponsePrepareProposal) RemovedTxs() []*TxRecord {
|
||||
trs := []*TxRecord{}
|
||||
var trs []*TxRecord
|
||||
for _, tr := range rpp.TxRecords {
|
||||
if tr.Action == TxRecord_REMOVED {
|
||||
trs = append(trs, tr)
|
||||
@@ -235,7 +235,7 @@ func (rpp *ResponsePrepareProposal) RemovedTxs() []*TxRecord {
|
||||
|
||||
// AddedTxs returns all of the TxRecords that are marked as added to the proposal.
|
||||
func (rpp *ResponsePrepareProposal) AddedTxs() []*TxRecord {
|
||||
trs := []*TxRecord{}
|
||||
var trs []*TxRecord
|
||||
for _, tr := range rpp.TxRecords {
|
||||
if tr.Action == TxRecord_ADDED {
|
||||
trs = append(trs, tr)
|
||||
|
||||
Reference in New Issue
Block a user