Skip to content

Commit

Permalink
Add SetSubnetValidatorWeightTx complexity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Oct 8, 2024
1 parent 155b629 commit ae5c712
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vms/platformvm/txs/fee/calculator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,17 @@ var (
},
expectedDynamicFee: 151_000,
},
{
name: "SetSubnetValidatorWeightTx",
tx: "00000000002500003039000000000000000000000000000000000000000000000000000000000000000000000001dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db00000007002386f1f88b5100000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c00000001389c41b6ed301e4c118bd23673268fd2054b772efcf25685a117b74bab7ae5e400000000dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db00000005002386f1f88b552a000000010000000000000000000000d7000000003039705f3d4415f990225d3df5ce437d7af2aa324b1bbce854ee34ab6f39882250d200000044000000000001000000000000003600000000000338e6e9fe31c6d070a8c792dbacf6d0aefb8eac2aded49cc0aa9f422d1fdd9ecd0000000000000001000000000000000500000000000000010187f4bb2c42869c56f023a1ca81045aff034acd490b8f15b5069025f982e605e077007fc588f7d56369a65df7574df3b70ff028ea173739c789525ab7eebfcb5c115b13cca8f02b362104b700c75bc95234109f3f1360ddcb4ec3caf6b0e821cb0000000100000009000000010a29f3c86d52908bf2efbc3f918a363df704c429d66c8d6615712a2a584a2a5f264a9e7b107c07122a06f31cadc2f51285884d36fe8df909a07467417f1d64cf00",
expectedStaticFeeErr: ErrUnsupportedTx,
expectedComplexity: gas.Dimensions{
gas.Bandwidth: 518, // The length of the tx in bytes
gas.DBRead: IntrinsicSetSubnetValidatorWeightTxComplexities[gas.DBRead] + intrinsicInputDBRead,
gas.DBWrite: IntrinsicSetSubnetValidatorWeightTxComplexities[gas.DBWrite] + intrinsicInputDBWrite + intrinsicOutputDBWrite,
gas.Compute: 0, // TODO: implement
},
expectedDynamicFee: 131_800,
},
}
)

0 comments on commit ae5c712

Please sign in to comment.