Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestBackend ¶
type TestBackend struct {
*backends.SimulatedBackend
}
TestBackend is the backend to use for tests with a simulated backend
func NewTestBackend ¶
func NewTestBackend(backend *backends.SimulatedBackend) *TestBackend
NewTestBackend returns a new TestBackend for the given SimulatedBackend It also causes an initial commit to make sure that genesis accounts are set up
func (*TestBackend) Close ¶
func (b *TestBackend) Close()
Close overrides the Close function of the underlying SimulatedBackend so that it does nothing This allows the same SimulatedBackend backend to be reused across tests This is necessary due to some memory leakage issues with the used version of the SimulatedBackend
func (*TestBackend) SendTransaction ¶
func (b *TestBackend) SendTransaction(ctx context.Context, tx *types.Transaction) (err error)
SendTransaction adds a commit after a successful send
Click to show internal directories.
Click to hide internal directories.