more stuff

This commit is contained in:
Tim Williams 2018-06-18 17:55:53 -04:00 committed by Dustin Brickwood
parent db82bc9603
commit e6fdff4860
2 changed files with 11 additions and 5 deletions

View file

@ -4,7 +4,6 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/common"
"fmt"
)
const (
@ -16,6 +15,8 @@ const (
//var api *eth.PrivateDebugAPI
var EthereumObject interface{}
var Chaindb_global ethdb.Database
func SetChainDB(db ethdb.Database){
@ -52,4 +53,8 @@ func MyTraceTransaction(hash string) (interface{}) {
fmt.Println(blockHash)
fmt.Println(index)
return 42
}
func setEthObject(ethobj interface{}){
EthereumObject = ethobj
}

View file

@ -49,10 +49,10 @@ import (
"github.com/ethereum/go-ethereum/rpc"
)
var EthObject *Ethereum
var BlockchainObject *core.BlockChain
var DebugApi *PrivateDebugAPI
type LesServer interface {
Start(srvr *p2p.Server)
Stop()
@ -148,8 +148,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks),
}
EthObject = eth
log.Info("Initialising Ethereum protocol", "versions", ProtocolVersions, "network", config.NetworkId)
if !config.SkipBcVersionCheck {
@ -197,6 +195,9 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
}
eth.ApiBackend.gpo = gasprice.NewOracle(eth.ApiBackend, gpoParams)
DebugApi.eth = eth
DebugApi.config = chainConfig
return eth, nil
}