Skip to content

Commit

Permalink
Standardize P-Chain tx visitor order (#3529)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Nov 7, 2024
1 parent beebbe0 commit 5b06d93
Show file tree
Hide file tree
Showing 8 changed files with 362 additions and 355 deletions.
8 changes: 4 additions & 4 deletions vms/platformvm/metrics/tx_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ func (m *txMetrics) TransferSubnetOwnershipTx(*txs.TransferSubnetOwnershipTx) er
return nil
}

func (m *txMetrics) ConvertSubnetTx(*txs.ConvertSubnetTx) error {
func (m *txMetrics) BaseTx(*txs.BaseTx) error {
m.numTxs.With(prometheus.Labels{
txLabel: "convert_subnet",
txLabel: "base",
}).Inc()
return nil
}

func (m *txMetrics) BaseTx(*txs.BaseTx) error {
func (m *txMetrics) ConvertSubnetTx(*txs.ConvertSubnetTx) error {
m.numTxs.With(prometheus.Labels{
txLabel: "base",
txLabel: "convert_subnet",
}).Inc()
return nil
}
6 changes: 3 additions & 3 deletions vms/platformvm/txs/executor/atomic_tx_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ func (*atomicTxExecutor) TransformSubnetTx(*txs.TransformSubnetTx) error {
return ErrWrongTxType
}

func (*atomicTxExecutor) TransferSubnetOwnershipTx(*txs.TransferSubnetOwnershipTx) error {
func (*atomicTxExecutor) AddPermissionlessValidatorTx(*txs.AddPermissionlessValidatorTx) error {
return ErrWrongTxType
}

func (*atomicTxExecutor) AddPermissionlessValidatorTx(*txs.AddPermissionlessValidatorTx) error {
func (*atomicTxExecutor) AddPermissionlessDelegatorTx(*txs.AddPermissionlessDelegatorTx) error {
return ErrWrongTxType
}

func (*atomicTxExecutor) AddPermissionlessDelegatorTx(*txs.AddPermissionlessDelegatorTx) error {
func (*atomicTxExecutor) TransferSubnetOwnershipTx(*txs.TransferSubnetOwnershipTx) error {
return ErrWrongTxType
}

Expand Down
Loading

0 comments on commit 5b06d93

Please sign in to comment.