mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-08 13:00:08 +00:00
24 lines
541 B
Go
24 lines
541 B
Go
package mempool
|
|
|
|
// import (
|
|
// "testing"
|
|
|
|
// "github.com/stretchr/testify/require"
|
|
// "github.com/tendermint/tendermint/types"
|
|
// )
|
|
|
|
// func TestMempoolIDsBasic(t *testing.T) {
|
|
// ids := NewMempoolIDs()
|
|
|
|
// peerID, err := types.NewNodeID("0011223344556677889900112233445566778899")
|
|
// require.NoError(t, err)
|
|
|
|
// ids.ReserveForPeer(peerID)
|
|
// require.EqualValues(t, 1, ids.GetForPeer(peerID))
|
|
// ids.Reclaim(peerID)
|
|
|
|
// ids.ReserveForPeer(peerID)
|
|
// require.EqualValues(t, 2, ids.GetForPeer(peerID))
|
|
// ids.Reclaim(peerID)
|
|
// }
|