Renamed block manager to state manager
This commit is contained in:
parent
f7fb5b902c
commit
fbd53f0e34
@ -57,7 +57,7 @@ type Gui struct {
|
|||||||
|
|
||||||
// Create GUI, but doesn't start it
|
// Create GUI, but doesn't start it
|
||||||
func New(ethereum *eth.Ethereum) *Gui {
|
func New(ethereum *eth.Ethereum) *Gui {
|
||||||
lib := &EthLib{blockManager: ethereum.StateManager(), blockChain: ethereum.BlockChain(), txPool: ethereum.TxPool()}
|
lib := &EthLib{stateManager: ethereum.StateManager(), blockChain: ethereum.BlockChain(), txPool: ethereum.TxPool()}
|
||||||
db, err := ethdb.NewLDBDatabase("tx_database")
|
db, err := ethdb.NewLDBDatabase("tx_database")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type EthLib struct {
|
type EthLib struct {
|
||||||
blockManager *ethchain.BlockManager
|
stateManager *ethchain.StateManager
|
||||||
blockChain *ethchain.BlockChain
|
blockChain *ethchain.BlockChain
|
||||||
txPool *ethchain.TxPool
|
txPool *ethchain.TxPool
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ func (lib *EthLib) CreateTx(receiver, a, data string) string {
|
|||||||
amount := ethutil.Big(a)
|
amount := ethutil.Big(a)
|
||||||
code := ethchain.Compile(strings.Split(data, "\n"))
|
code := ethchain.Compile(strings.Split(data, "\n"))
|
||||||
tx := ethchain.NewTransaction(hash, amount, code)
|
tx := ethchain.NewTransaction(hash, amount, code)
|
||||||
tx.Nonce = lib.blockManager.GetAddrState(keyRing.Get(1).Bytes()).Nonce
|
tx.Nonce = lib.stateManager.GetAddrState(keyRing.Get(1).Bytes()).Nonce
|
||||||
|
|
||||||
tx.Sign(keyRing.Get(0).Bytes())
|
tx.Sign(keyRing.Get(0).Bytes())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user