Documentation
¶
Index ¶
- Constants
- Variables
- type Balance
- type State
- func (state *State) AtomicWrite(writeBatchs []*db.WriteBatch) error
- func (state *State) GetBalance(a accounts.Address) (*big.Int, uint32, error)
- func (state *State) GetTmpBalance(addr accounts.Address) (*Balance, error)
- func (state *State) Init(a accounts.Address) error
- func (state *State) Transfer(sender, recipient accounts.Address, fee *big.Int, balance *Balance, ...) ([]*db.WriteBatch, error)
- func (state *State) UpdateBalance(a accounts.Address, balance *Balance, fee *big.Int, operation uint32) ([]*db.WriteBatch, error)
Constants ¶
View Source
const ( // OperationPlus is plus operation in state OperationPlus uint32 = iota // OperationSub is sub operation in state OperationSub )
Variables ¶
View Source
var ( //ErrNegativeBalance negative balance when execute transaction ErrNegativeBalance = errors.New("balance is Negative") )
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
State represents the account state
func (*State) AtomicWrite ¶
func (state *State) AtomicWrite(writeBatchs []*db.WriteBatch) error
AtomicWrite atomic writeBatchs
func (*State) GetBalance ¶
GetBalance returns balance by account
func (*State) GetTmpBalance ¶
GetTmpBalance get tmpBalance When the block is not packaged
Click to show internal directories.
Click to hide internal directories.