Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge c5bb6ce into 69a1ef5
Browse files Browse the repository at this point in the history
  • Loading branch information
merl111 authored Jun 5, 2019
2 parents 69a1ef5 + c5bb6ce commit a266e3a
Show file tree
Hide file tree
Showing 49 changed files with 1,914 additions and 1,394 deletions.
16 changes: 8 additions & 8 deletions neo/Blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def GetSystemShare():

def GetStateMachine():
from neo.SmartContract.StateMachine import StateMachine
from neo.Implementations.Blockchains.LevelDB.DBCollection import DBCollection
from neo.Implementations.Blockchains.LevelDB.DBPrefix import DBPrefix
from neo.Storage.Interface.DBInterface import DBInterface
from neo.Storage.Common.DBPrefix import DBPrefix
from neo.Core.State.AccountState import AccountState
from neo.Core.State.AssetState import AssetState
from neo.Core.State.ValidatorState import ValidatorState
Expand All @@ -30,13 +30,13 @@ def GetStateMachine():

bc = GetBlockchain()

accounts = DBCollection(bc._db, DBPrefix.ST_Account, AccountState)
assets = DBCollection(bc._db, DBPrefix.ST_Asset, AssetState)
validators = DBCollection(bc._db, DBPrefix.ST_Validator, ValidatorState)
contracts = DBCollection(bc._db, DBPrefix.ST_Contract, ContractState)
storages = DBCollection(bc._db, DBPrefix.ST_Storage, StorageItem)
accounts = DBInterface(bc._db, DBPrefix.ST_Account, AccountState)
assets = DBInterface(bc._db, DBPrefix.ST_Asset, AssetState)
validators = DBInterface(bc._db, DBPrefix.ST_Validator, ValidatorState)
contracts = DBInterface(bc._db, DBPrefix.ST_Contract, ContractState)
storages = DBInterface(bc._db, DBPrefix.ST_Storage, StorageItem)

return StateMachine(accounts, validators, assets, contracts, storages, None)
return StateMachine(accounts, validators, assets, contracts, storages, None, bc)


def GetConsensusAddress(validators):
Expand Down
Loading

0 comments on commit a266e3a

Please sign in to comment.