From c757fac40acb5aa5101a94b47ab8f0887c335fb1 Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Wed, 2 Oct 2024 18:46:07 -0400 Subject: [PATCH] fix executor --- vms/platformvm/txs/executor/standard_tx_executor.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vms/platformvm/txs/executor/standard_tx_executor.go b/vms/platformvm/txs/executor/standard_tx_executor.go index a268dbd2f168..7e74d2459e08 100644 --- a/vms/platformvm/txs/executor/standard_tx_executor.go +++ b/vms/platformvm/txs/executor/standard_tx_executor.go @@ -540,6 +540,12 @@ func (e *StandardTxExecutor) ConvertSubnetTx(tx *txs.ConvertSubnetTx) error { ) for i, vdr := range tx.Validators { vdr := vdr + + nodeID, err := ids.ToNodeID(vdr.NodeID) + if err != nil { + return err + } + remainingBalanceOwner, err := txs.Codec.Marshal(txs.CodecVersion, &vdr.RemainingBalanceOwner) if err != nil { return err @@ -552,7 +558,7 @@ func (e *StandardTxExecutor) ConvertSubnetTx(tx *txs.ConvertSubnetTx) error { sov := state.SubnetOnlyValidator{ ValidationID: tx.Subnet.Append(uint32(i)), SubnetID: tx.Subnet, - NodeID: vdr.NodeID, + NodeID: nodeID, PublicKey: bls.PublicKeyToUncompressedBytes(vdr.Signer.Key()), RemainingBalanceOwner: remainingBalanceOwner, DeactivationOwner: deactivationOwner, @@ -583,7 +589,7 @@ func (e *StandardTxExecutor) ConvertSubnetTx(tx *txs.ConvertSubnetTx) error { } subnetConversionData.Validators[i] = message.SubnetConversionValidatorData{ - NodeID: vdr.NodeID.Bytes(), + NodeID: vdr.NodeID, BLSPublicKey: vdr.Signer.PublicKey, Weight: vdr.Weight, }