@ -197,30 +197,41 @@ func testNameReg(t *testing.T, typ string) {
con.Close()
}()
types.MinNameRegistrationPeriod=1
// register a new name, check if its there
amt,fee:=uint64(6969),uint64(1000)
// since entries ought to be unique and these run against different clients, we append the typ
name:="ye_old_domain_name_"+typ
data:="these are amongst the things I wish to bestow upon the youth of generations come: a safe supply of honey, and a better money. For what else shall they need"
t.Fatal(fmt.Sprintf("Err on entry.Data: Got %s, expected %s",entry.Data,data))
}
ifbytes.Compare(entry.Owner,user[0].Address)!=0{
t.Fatal(fmt.Sprintf("Err on entry.Owner: Got %s, expected %s",entry.Owner,user[0].Address))
}
// update the data as the owner, make sure still there
data="if not now, when"
numDesiredBlocks=uint64(2)
data="these are amongst the things I wish to bestow upon the youth of generations come: a safe supply of honey, and a better money. For what else shall they need"
t.Fatalf("Expected invalid name error from %s",name)
}
}
// try some bad data. these should all fail
name:="hold_it_chum"
datas:=[]string{"cold&warm","!@#$%^&*()","<<<>>>>","because why would you ever need a ~ or a & or even a % in a json file? make your case and we'll talk"}
data="on this side of neptune there are 1234567890 people: first is OMNIVORE. Or is it. Ok this is pretty restrictive. No exclamations :(. Faces tho :')"
// update it as new owner, with new data (longer), but keep the expiry!
data="In the beginning there was no thing, not even the beginning. It hadn't been here, no there, nor for that matter anywhere, not especially because it had not to even exist, let alone to not. Nothing especially odd about that."