mirror of https://github.com/status-im/op-geth.git
Namereg lookup fix
This commit is contained in:
parent
d8339fa29a
commit
9ff97a98a7
|
@ -115,9 +115,13 @@ var namereg = ethutil.FromHex("bb5f186604d057c1c5240ca2ae0f6430138ac010")
|
||||||
func GetAddressFromNameReg(stateManager *ethchain.StateManager, name string) []byte {
|
func GetAddressFromNameReg(stateManager *ethchain.StateManager, name string) []byte {
|
||||||
recp := new(big.Int).SetBytes([]byte(name))
|
recp := new(big.Int).SetBytes([]byte(name))
|
||||||
object := stateManager.CurrentState().GetStateObject(namereg)
|
object := stateManager.CurrentState().GetStateObject(namereg)
|
||||||
|
if object != nil {
|
||||||
reg := object.GetStorage(recp)
|
reg := object.GetStorage(recp)
|
||||||
|
|
||||||
return reg.Bytes()
|
return reg.Bytes()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, scriptStr string) (*PReceipt, error) {
|
func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, scriptStr string) (*PReceipt, error) {
|
||||||
|
|
Loading…
Reference in New Issue