prints vanity under decode command

This commit is contained in:
Edwin 2017-06-26 15:24:42 +08:00
parent e9c98d1e0e
commit 836f391476
2 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,7 @@ Decode extraData for the given input
$ build/bin/istanbul decode --extradata 0x0000000000000000000000000000000000000000000000000000000000000000f89af85494475cc98b5521ab2a1335683e7567c8048bfe79ed9407d8299de61faed3686ba4c4e6c3b9083d7e2371944fe035ce99af680d89e2c4d73aca01dbfc1bd2fd94dc421209441a754f79c4a4ecd2b49c935aad0312b8410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0
OUTPUT:
vanity: 0x0000000000000000000000000000000000000000000000000000000000000000
validator: 0x475cc98b5521ab2a1335683e7567c8048bfe79ed
validator: 0x07d8299de61faed3686ba4c4e6c3b9083d7e2371
validator: 0x4fe035ce99af680d89e2c4d73aca01dbfc1bd2fd

View File

@ -125,6 +125,9 @@ func decodeExtraData(extraData string) error {
if err != nil {
return err
}
fmt.Println("vanity: ", "0x"+common.Bytes2Hex(extra[:atypes.IstanbulExtraVanity]))
for _, v := range istanbulExtra.Validators {
fmt.Println("validator: ", v.Hex())
}