mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 21:31:23 +00:00
better mempool queueing
This commit is contained in:
@ -31,7 +31,7 @@ func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error) {
|
||||
peerRoundStates := []string{}
|
||||
for _, peer := range p2pSwitch.Peers().List() {
|
||||
// TODO: clean this up?
|
||||
peerState := peer.Data.Get(cm.PeerStateKey).(*cm.PeerState)
|
||||
peerState := peer.Data.Get(types.PeerStateKey).(*cm.PeerState)
|
||||
peerRoundState := peerState.GetRoundState()
|
||||
peerRoundStateStr := peer.Key + ":" + string(wire.JSONBytes(peerRoundState))
|
||||
peerRoundStates = append(peerRoundStates, peerRoundStateStr)
|
||||
|
@ -30,5 +30,6 @@ func BroadcastTx(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
|
||||
}
|
||||
|
||||
func ListUnconfirmedTxs() (*ctypes.ResultListUnconfirmedTxs, error) {
|
||||
return &ctypes.ResultListUnconfirmedTxs{mempoolReactor.Mempool.GetProposalTxs()}, nil
|
||||
txs := mempoolReactor.Mempool.GetProposalTxs()
|
||||
return &ctypes.ResultListUnconfirmedTxs{len(txs), txs}, nil
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ type Receipt struct {
|
||||
}
|
||||
|
||||
type ResultListUnconfirmedTxs struct {
|
||||
N int `json:"n_txs"`
|
||||
Txs []types.Tx `json:"txs"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user