Skip to content

Commit

Permalink
Fix short tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Dec 19, 2024
1 parent 0e34756 commit a20b017
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions node/external/transactionAPI/apiTransactionProcessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,10 @@ func TestApiTransactionProcessor_GetTransactionsPool(t *testing.T) {

func createTx(hash []byte, sender string, nonce uint64) *txcache.WrappedTransaction {
tx := &transaction.Transaction{
SndAddr: []byte(sender),
Nonce: nonce,
Value: big.NewInt(100000 + int64(nonce)),
SndAddr: []byte(sender),
Nonce: nonce,
Value: big.NewInt(100000 + int64(nonce)),
GasLimit: 50000,
}

return &txcache.WrappedTransaction{
Expand Down
4 changes: 2 additions & 2 deletions process/block/preprocess/selectionSession_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ func TestSelectionSession_GetAccountState(t *testing.T) {

state, err := session.GetAccountState([]byte("alice"))
require.NoError(t, err)
require.Equal(t, uint64(42), state.Nonce)
require.Equal(t, uint64(42), state.GetNonce())

state, err = session.GetAccountState([]byte("bob"))
require.NoError(t, err)
require.Equal(t, uint64(7), state.Nonce)
require.Equal(t, uint64(7), state.GetNonce())

state, err = session.GetAccountState([]byte("carol"))
require.ErrorContains(t, err, "account not found: carol")
Expand Down

0 comments on commit a20b017

Please sign in to comment.