erigon-pulse/cmd/devnet/commands/tx.go
Leonard Chinonso f76736e14a
Implemented mining of contract transactions on the devnet tool (#6102)
- Added a new method and type for contract transactions.
- Added functions to emit fallback events from contract transactions.
- Added GetLogs request generator
- Added tests for GetLogs request generator
2022-11-22 20:28:53 +07:00

27 lines
863 B
Go

package commands
import (
"fmt"
"github.com/ledgerwatch/erigon/cmd/devnet/models"
"github.com/ledgerwatch/erigon/cmd/devnet/requests"
)
func checkTxPoolContent(expectedPendingSize, expectedQueuedSize int) {
pendingSize, queuedSize, err := requests.TxpoolContent(models.ReqId)
if err != nil {
fmt.Printf("FAILURE => error getting txpool content: %v\n", err)
return
}
if pendingSize != expectedPendingSize {
fmt.Printf("FAILURE => %v\n", fmt.Errorf("expected %d transaction(s) in pending pool, got %d", expectedPendingSize, pendingSize))
}
if queuedSize != expectedQueuedSize {
fmt.Printf("FAILURE => %v\n", fmt.Errorf("expected %d transaction(s) in queued pool, got %d", expectedQueuedSize, queuedSize))
}
fmt.Printf("SUCCESS => %d transaction(s) in the pending pool and %d transaction(s) in the queued pool\n", pendingSize, queuedSize)
}