cmd/guardiand: fix governance VAA serialization
And add some extra debug logging for governance-vaa-verify. commit-id:10deaff4
This commit is contained in:
parent
91296e6772
commit
29cd5a3934
|
@ -90,7 +90,7 @@ func adminContractUpgradeToVAA(req *nodev1.ContractUpgrade, guardianSetIndex uin
|
|||
}
|
||||
|
||||
newContractAddress := vaa.Address{}
|
||||
copy(newContractAddress[:], req.NewContract)
|
||||
copy(newContractAddress[:], b)
|
||||
|
||||
v := vaa.CreateGovernanceVAA(nonce, sequence, guardianSetIndex,
|
||||
vaa.BodyContractUpgrade{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package guardiand
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
"io/ioutil"
|
||||
|
@ -59,6 +60,13 @@ func runGovernanceVAAVerify(cmd *cobra.Command, args []string) {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
b, err := v.Marshal()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
log.Printf("Serialized: %v", hex.EncodeToString(b))
|
||||
|
||||
log.Printf("VAA with digest %s: %+v", digest.Hex(), spew.Sdump(v))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue