2020-10-28 06:36:49 +01:00
|
|
|
package stake
|
2018-11-10 03:37:59 +01:00
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestClaimHelper(t *testing.T) {
|
|
|
|
for _, rawClaim := range raw_claims {
|
|
|
|
helper, err := DecodeClaimHex(rawClaim, "lbrycrd_main")
|
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
_, err = helper.RenderJSON()
|
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
|
2019-04-07 06:29:12 +02:00
|
|
|
_, err = helper.serialized()
|
2018-11-10 03:37:59 +01:00
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
2019-04-07 06:29:12 +02:00
|
|
|
_, err = helper.serializedHexString()
|
2018-11-10 03:37:59 +01:00
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
2019-04-07 06:29:12 +02:00
|
|
|
_, err = helper.serializedNoSignature()
|
2018-11-10 03:37:59 +01:00
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
err = helper.ValidateAddresses("lbrycrd_main")
|
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|