Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
  • Loading branch information
joshua-kim committed Dec 14, 2023
1 parent bd4bfbe commit 1cc94e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion scripts/mocks.mockgen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ github.com/ava-labs/avalanchego/vms/platformvm/block=Block=vms/platformvm/block/
github.com/ava-labs/avalanchego/vms/platformvm/state=Chain,Diff,State,Versions=vms/platformvm/state/mock_state.go
github.com/ava-labs/avalanchego/vms/platformvm/state=StakerIterator=vms/platformvm/state/mock_staker_iterator.go
github.com/ava-labs/avalanchego/vms/platformvm/txs/builder=Builder=vms/platformvm/txs/builder/mock_builder.go
github.com/ava-labs/avalanchego/vms/platformvm/txs/mempool=Mempool=vms/platformvm/txs/mempool/mock_mempool.go
github.com/ava-labs/avalanchego/vms/platformvm/utxo=Verifier=vms/platformvm/utxo/mock_verifier.go
github.com/ava-labs/avalanchego/vms/proposervm/proposer=Windower=vms/proposervm/proposer/mock_windower.go
github.com/ava-labs/avalanchego/vms/proposervm/state=State=vms/proposervm/state/mock_state.go
Expand Down
4 changes: 4 additions & 0 deletions vms/platformvm/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ func (n *Network) AppGossip(ctx context.Context, nodeID ids.NodeID, msgBytes []b
return nil
}

// IssueTx verifies the transaction at the currently preferred state, adds
// it to the mempool, and gossips it to the network.
//
// Invariant: Assumes the context lock is held.
func (n *Network) IssueTx(ctx context.Context, tx *txs.Tx) error {
if err := n.issueTx(tx); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions vms/platformvm/txs/mempool/mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
"github.com/ava-labs/avalanchego/vms/secp256k1fx"
)

var preFundedKeys = secp256k1.TestKeys()

const (
bloomMaxItems = 10
bloomFalsePositiveRate = 0.1
bloomMaxFalsePositiveRate = 0.5
)

var preFundedKeys = secp256k1.TestKeys()

// shows that valid tx is not added to mempool if this would exceed its maximum
// size
func TestBlockBuilderMaxMempoolSizeHandling(t *testing.T) {
Expand Down

0 comments on commit 1cc94e3

Please sign in to comment.