Added dns lookup

This commit is contained in:
obscuren
2014-08-07 15:11:54 +02:00
parent da50c75148
commit 7272577fe6
3 changed files with 19 additions and 1 deletions

View File

@@ -15,6 +15,11 @@ func (self *Config) Get(name string) *Object {
switch name {
case "NameReg":
addr = []byte{0}
case "DomainReg":
objectAddr := configCtrl.GetStorage(ethutil.BigD([]byte{0}))
domainAddr := (&Object{self.pipe.World().safeGet(objectAddr.Bytes())}).StorageString("DomainReg").Bytes()
return &Object{self.pipe.World().safeGet(domainAddr)}
default:
addr = ethutil.RightPadBytes([]byte(name), 32)
}