aboutsummaryrefslogtreecommitdiffstats
path: root/ethpub/pub.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethpub/pub.go')
-rw-r--r--ethpub/pub.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/ethpub/pub.go b/ethpub/pub.go
index 5d01a7a44..7cc7cf6ce 100644
--- a/ethpub/pub.go
+++ b/ethpub/pub.go
@@ -6,6 +6,7 @@ import (
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethcrypto"
"github.com/ethereum/eth-go/ethlog"
+ "github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
"math/big"
"strings"
@@ -24,11 +25,11 @@ type helper struct {
func EthereumConfig(stateManager *ethchain.StateManager) helper {
return helper{stateManager}
}
-func (self helper) obj() *ethchain.StateObject {
+func (self helper) obj() *ethstate.StateObject {
return self.sm.CurrentState().GetStateObject(cnfCtr)
}
-func (self helper) NameReg() *ethchain.StateObject {
+func (self helper) NameReg() *ethstate.StateObject {
if self.obj() != nil {
addr := self.obj().GetStorage(big.NewInt(0))
if len(addr.Bytes()) > 0 {
@@ -48,6 +49,12 @@ type PEthereum struct {
}
func NewPEthereum(manager ethchain.EthManager) *PEthereum {
+ logger.Warnln("DEPRECATED: ethpub.New should be used in favour of ethpub.NewPEthereum")
+
+ return New(manager)
+}
+
+func New(manager ethchain.EthManager) *PEthereum {
return &PEthereum{
manager,
manager.StateManager(),