mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 01:11:32 +00:00
Set Pubkey on vm.Account.
This commit is contained in:
@ -20,13 +20,19 @@ func toVMAccount(acc *ac.Account) *vm.Account {
|
||||
Code: acc.Code, // This is crazy.
|
||||
Nonce: uint64(acc.Sequence),
|
||||
StorageRoot: vm.BytesToWord(acc.StorageRoot),
|
||||
Other: acc.PubKey,
|
||||
}
|
||||
}
|
||||
|
||||
// Converts vm.Account to state.Account struct.
|
||||
func toStateAccount(acc *vm.Account) *ac.Account {
|
||||
pubKey, ok := acc.Other.(ac.PubKey)
|
||||
if !ok {
|
||||
pubKey = ac.PubKeyNil{}
|
||||
}
|
||||
return &ac.Account{
|
||||
Address: acc.Address.Address(),
|
||||
PubKey: pubKey,
|
||||
Balance: acc.Balance,
|
||||
Code: acc.Code,
|
||||
Sequence: uint(acc.Nonce),
|
||||
|
@ -33,6 +33,7 @@ type Account struct {
|
||||
Code []byte
|
||||
Nonce uint64
|
||||
StorageRoot Word
|
||||
Other interface{} // For holding all other data.
|
||||
}
|
||||
|
||||
type Log struct {
|
||||
|
Reference in New Issue
Block a user