This commit is contained in:
cachalots
2026-02-11 17:49:43 +08:00
parent 3fdd4c4490
commit 852ad4b382
4 changed files with 21 additions and 13 deletions

View File

@@ -27,10 +27,11 @@ func budgetParser(tx *Tx, instr Instruction, _ InnerInstructions, offset [2]uint
}
}
func computeUnitLimitParser(offset [2]uint, _ *Tx, decodedData []byte) ([2]uint, error) {
if len(decodedData) < 8 {
func computeUnitLimitParser(offset [2]uint, tx *Tx, decodedData []byte) ([2]uint, error) {
if len(decodedData) < 4 {
return increaseOffset(offset), nil
}
tx.CuLimit = binary.BigEndian.Uint32(decodedData[:4])
return increaseOffset(offset), nil
}