Documentation ¶
Index ¶
- type AccountStatus
- type MockSandbox
- func (m *MockSandbox) Account(addr crypto.Address) *account.Account
- func (m *MockSandbox) Committee() committee.Reader
- func (m *MockSandbox) CurrentHeight() uint32
- func (m *MockSandbox) FindBlockHashByStamp(stamp hash.Stamp) (hash.Hash, bool)
- func (m *MockSandbox) FindBlockHeightByStamp(stamp hash.Stamp) (uint32, bool)
- func (m *MockSandbox) IterateAccounts(consumer func(crypto.Address, *AccountStatus))
- func (m *MockSandbox) IterateValidators(consumer func(*ValidatorStatus))
- 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) UpdateAccount(addr crypto.Address, acc *account.Account)
- func (m *MockSandbox) UpdateValidator(val *validator.Validator)
- func (m *MockSandbox) Validator(addr crypto.Address) *validator.Validator
- func (m *MockSandbox) VerifyProof(hash.Stamp, sortition.Proof, *validator.Validator) bool
- type Sandbox
- type ValidatorStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountStatus ¶
type MockSandbox ¶
type MockSandbox struct { TestParams param.Params TestStore *store.MockStore TestCommittee committee.Committee TestCommitteeSigners []crypto.Signer AcceptTestSortition bool }
MockSandbox is a testing mock for sandbox.
func MockingSandbox ¶
func MockingSandbox() *MockSandbox
func (*MockSandbox) Committee ¶
func (m *MockSandbox) Committee() committee.Reader
func (*MockSandbox) CurrentHeight ¶
func (m *MockSandbox) CurrentHeight() uint32
func (*MockSandbox) FindBlockHashByStamp ¶
func (*MockSandbox) FindBlockHeightByStamp ¶
func (m *MockSandbox) FindBlockHeightByStamp(stamp hash.Stamp) (uint32, bool)
func (*MockSandbox) IterateAccounts ¶
func (m *MockSandbox) IterateAccounts(consumer func(crypto.Address, *AccountStatus))
func (*MockSandbox) IterateValidators ¶
func (m *MockSandbox) IterateValidators(consumer func(*ValidatorStatus))
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) UpdateAccount ¶
func (m *MockSandbox) UpdateAccount(addr crypto.Address, acc *account.Account)
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) Validator(crypto.Address) *validator.Validator MakeNewValidator(*bls.PublicKey) *validator.Validator UpdateValidator(*validator.Validator) VerifyProof(hash.Stamp, sortition.Proof, *validator.Validator) bool Committee() committee.Reader FindBlockHashByStamp(stamp hash.Stamp) (hash.Hash, bool) FindBlockHeightByStamp(stamp hash.Stamp) (uint32, bool) Params() param.Params CurrentHeight() uint32 IterateAccounts(consumer func(crypto.Address, *AccountStatus)) IterateValidators(consumer func(*ValidatorStatus)) }
type ValidatorStatus ¶
Click to show internal directories.
Click to hide internal directories.