Skip to content

Fix SubnetToL1ConversionData typo #3555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/e2e/p/l1.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ var _ = e2e.DescribePChain("[L1]", func() {
SubnetID: subnetID,
ManagerChainID: chainID,
ManagerAddress: address,
Validators: []warpmessage.SubnetToL1ConverstionValidatorData{
Validators: []warpmessage.SubnetToL1ConversionValidatorData{
{
NodeID: subnetGenesisNode.NodeID.Bytes(),
BLSPublicKey: genesisNodePoP.PublicKey,
Expand Down
4 changes: 2 additions & 2 deletions vms/platformvm/txs/executor/standard_tx_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ func (e *standardTxExecutor) ConvertSubnetToL1Tx(tx *txs.ConvertSubnetToL1Tx) er
SubnetID: tx.Subnet,
ManagerChainID: tx.ChainID,
ManagerAddress: tx.Address,
Validators: make([]message.SubnetToL1ConverstionValidatorData, len(tx.Validators)),
Validators: make([]message.SubnetToL1ConversionValidatorData, len(tx.Validators)),
}
)
for i, vdr := range tx.Validators {
Expand Down Expand Up @@ -763,7 +763,7 @@ func (e *standardTxExecutor) ConvertSubnetToL1Tx(tx *txs.ConvertSubnetToL1Tx) er
return err
}

subnetToL1ConversionData.Validators[i] = message.SubnetToL1ConverstionValidatorData{
subnetToL1ConversionData.Validators[i] = message.SubnetToL1ConversionValidatorData{
NodeID: vdr.NodeID,
BLSPublicKey: vdr.Signer.PublicKey,
Weight: vdr.Weight,
Expand Down
2 changes: 1 addition & 1 deletion vms/platformvm/txs/executor/standard_tx_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2630,7 +2630,7 @@ func TestStandardExecutorConvertSubnetToL1Tx(t *testing.T) {
SubnetID: subnetID,
ManagerChainID: chainID,
ManagerAddress: address,
Validators: []message.SubnetToL1ConverstionValidatorData{
Validators: []message.SubnetToL1ConversionValidatorData{
{
NodeID: nodeID.Bytes(),
BLSPublicKey: pop.PublicKey,
Expand Down
10 changes: 5 additions & 5 deletions vms/platformvm/warp/message/subnet_to_l1_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import (
"github.com/ava-labs/avalanchego/vms/types"
)

type SubnetToL1ConverstionValidatorData struct {
type SubnetToL1ConversionValidatorData struct {
NodeID types.JSONByteSlice `serialize:"true" json:"nodeID"`
BLSPublicKey [bls.PublicKeyLen]byte `serialize:"true" json:"blsPublicKey"`
Weight uint64 `serialize:"true" json:"weight"`
}

type SubnetToL1ConversionData struct {
SubnetID ids.ID `serialize:"true" json:"subnetID"`
ManagerChainID ids.ID `serialize:"true" json:"managerChainID"`
ManagerAddress types.JSONByteSlice `serialize:"true" json:"managerAddress"`
Validators []SubnetToL1ConverstionValidatorData `serialize:"true" json:"validators"`
SubnetID ids.ID `serialize:"true" json:"subnetID"`
ManagerChainID ids.ID `serialize:"true" json:"managerChainID"`
ManagerAddress types.JSONByteSlice `serialize:"true" json:"managerAddress"`
Validators []SubnetToL1ConversionValidatorData `serialize:"true" json:"validators"`
}

// SubnetToL1ConversionID creates a subnet conversion ID from the provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestSubnetToL1ConversionID(t *testing.T) {
0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
},
ManagerAddress: []byte{0x41},
Validators: []SubnetToL1ConverstionValidatorData{
Validators: []SubnetToL1ConversionValidatorData{
{
NodeID: types.JSONByteSlice([]byte{
0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func main() {
SubnetID: subnetID,
ManagerChainID: chainID,
ManagerAddress: address,
Validators: []message.SubnetToL1ConverstionValidatorData{
Validators: []message.SubnetToL1ConversionValidatorData{
{
NodeID: nodeID.Bytes(),
BLSPublicKey: nodePoP.PublicKey,
Expand Down
Loading