neotest: add contract client wrapper

Reduces amount of boilerplate code in tests.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgeniy Stratonikov 2021-10-23 15:36:26 +03:00
parent e3625152c6
commit 1f9fd4a472
3 changed files with 276 additions and 226 deletions

View file

@ -238,8 +238,8 @@ func (e *Executor) SignBlock(b *block.Block) *block.Block {
return b
}
// AddBlockCheckHalt is a convenient wrapper over AddNewBlock and CheckHalt.
func (e *Executor) AddBlockCheckHalt(t *testing.T, bc blockchainer.Blockchainer, txs ...*transaction.Transaction) *block.Block {
// AddBlockCheckHalt is a convenient wrapper over AddBlock and CheckHalt.
func (e *Executor) AddBlockCheckHalt(t *testing.T, txs ...*transaction.Transaction) *block.Block {
b := e.AddNewBlock(t, txs...)
for _, tx := range txs {
e.CheckHalt(t, tx.Hash())