Documentation ¶
Index ¶
- type MockSandbox
- func (m *MockSandbox) Account(addr crypto.Address) *account.Account
- func (m *MockSandbox) AccumulatedFee() int64
- func (m *MockSandbox) AnyRecentTransaction(txID tx.ID) bool
- func (m *MockSandbox) CommitTransaction(trx *tx.Tx)
- func (m *MockSandbox) Committee() committee.Reader
- func (m *MockSandbox) CurrentHeight() uint32
- func (m *MockSandbox) IsJoinedCommittee(addr crypto.Address) bool
- func (m *MockSandbox) IterateAccounts(consumer func(crypto.Address, *account.Account, bool))
- func (m *MockSandbox) IterateValidators(consumer func(*validator.Validator, bool, bool))
- func (m *MockSandbox) JoinedToCommittee(addr crypto.Address)
- func (m *MockSandbox) MakeNewAccount(_ crypto.Address) *account.Account
- func (m *MockSandbox) MakeNewValidator(pub *bls.PublicKey) *validator.Validator
- func (m *MockSandbox) Params() param.Params
- func (m *MockSandbox) PowerDelta() int64
- func (m *MockSandbox) UpdateAccount(addr crypto.Address, acc *account.Account)
- func (m *MockSandbox) UpdatePowerDelta(delta int64)
- func (m *MockSandbox) UpdateValidator(val *validator.Validator)
- func (m *MockSandbox) Validator(addr crypto.Address) *validator.Validator
- func (m *MockSandbox) VerifyProof(uint32, sortition.Proof, *validator.Validator) bool
- type Sandbox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSandbox ¶
type MockSandbox struct { TestParams param.Params TestStore *store.MockStore TestCommittee committee.Committee TestAcceptSortition bool TestJoinedValidators map[crypto.Address]bool TestCommittedTrxs map[tx.ID]*tx.Tx TestPowerDelta int64 // contains filtered or unexported fields }
MockSandbox is a testing mock for sandbox.
func MockingSandbox ¶
func MockingSandbox(ts *testsuite.TestSuite) *MockSandbox
func (*MockSandbox) AccumulatedFee ¶ added in v0.15.0
func (m *MockSandbox) AccumulatedFee() int64
func (*MockSandbox) AnyRecentTransaction ¶ added in v0.15.0
func (m *MockSandbox) AnyRecentTransaction(txID tx.ID) bool
func (*MockSandbox) CommitTransaction ¶ added in v0.15.0
func (m *MockSandbox) CommitTransaction(trx *tx.Tx)
func (*MockSandbox) Committee ¶
func (m *MockSandbox) Committee() committee.Reader
func (*MockSandbox) CurrentHeight ¶
func (m *MockSandbox) CurrentHeight() uint32
func (*MockSandbox) IsJoinedCommittee ¶ added in v0.15.0
func (m *MockSandbox) IsJoinedCommittee(addr crypto.Address) bool
func (*MockSandbox) IterateAccounts ¶
func (*MockSandbox) IterateValidators ¶
func (m *MockSandbox) IterateValidators(consumer func(*validator.Validator, bool, bool))
func (*MockSandbox) JoinedToCommittee ¶ added in v0.15.0
func (m *MockSandbox) JoinedToCommittee(addr crypto.Address)
func (*MockSandbox) MakeNewAccount ¶
func (m *MockSandbox) MakeNewAccount(_ crypto.Address) *account.Account
func (*MockSandbox) MakeNewValidator ¶
func (m *MockSandbox) MakeNewValidator(pub *bls.PublicKey) *validator.Validator
func (*MockSandbox) Params ¶
func (m *MockSandbox) Params() param.Params
func (*MockSandbox) PowerDelta ¶ added in v0.12.0
func (m *MockSandbox) PowerDelta() int64
func (*MockSandbox) UpdateAccount ¶
func (m *MockSandbox) UpdateAccount(addr crypto.Address, acc *account.Account)
func (*MockSandbox) UpdatePowerDelta ¶ added in v0.12.0
func (m *MockSandbox) UpdatePowerDelta(delta int64)
func (*MockSandbox) UpdateValidator ¶
func (m *MockSandbox) UpdateValidator(val *validator.Validator)
func (*MockSandbox) Validator ¶
func (m *MockSandbox) Validator(addr crypto.Address) *validator.Validator
func (*MockSandbox) VerifyProof ¶
type Sandbox ¶
type Sandbox interface { Account(crypto.Address) *account.Account MakeNewAccount(crypto.Address) *account.Account UpdateAccount(crypto.Address, *account.Account) CommitTransaction(trx *tx.Tx) AnyRecentTransaction(txID tx.ID) bool Validator(crypto.Address) *validator.Validator MakeNewValidator(*bls.PublicKey) *validator.Validator UpdateValidator(*validator.Validator) JoinedToCommittee(crypto.Address) IsJoinedCommittee(crypto.Address) bool UpdatePowerDelta(delta int64) PowerDelta() int64 AccumulatedFee() int64 VerifyProof(uint32, sortition.Proof, *validator.Validator) bool Committee() committee.Reader Params() param.Params CurrentHeight() uint32 IterateAccounts(consumer func(crypto.Address, *account.Account, bool)) IterateValidators(consumer func(*validator.Validator, bool, bool)) }
Click to show internal directories.
Click to hide internal directories.