mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
more stuff
This commit is contained in:
parent
db82bc9603
commit
e6fdff4860
2 changed files with 11 additions and 5 deletions
|
|
@ -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){
|
||||
|
|
@ -53,3 +54,7 @@ func MyTraceTransaction(hash string) (interface{}) {
|
|||
fmt.Println(index)
|
||||
return 42
|
||||
}
|
||||
|
||||
func setEthObject(ethobj interface{}){
|
||||
EthereumObject = ethobj
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue