Skip to content
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
5 changes: 4 additions & 1 deletion ledger/common/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ func (s PlutusV3Script) Hash() ScriptHash {
)
}

func (s PlutusV3Script) Evaluate(scriptContext data.PlutusData, budget ExUnits) (ExUnits, error) {
func (s PlutusV3Script) Evaluate(
scriptContext data.PlutusData,
budget ExUnits,
) (ExUnits, error) {
var usedExUnits ExUnits
// Set budget
machineBudget := cek.DefaultExBudget
Expand Down
12 changes: 10 additions & 2 deletions ledger/common/script/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ func TestScriptContextV3(t *testing.T) {
t.Run(
testDef.name,
func(t *testing.T) {
txInfo, err := buildTxInfoV3(testDef.txHex, testDef.inputsHex, testDef.outputsHex)
txInfo, err := buildTxInfoV3(
testDef.txHex,
testDef.inputsHex,
testDef.outputsHex,
)
if err != nil {
t.Fatalf("unexpected error: %s", err)
}
Expand All @@ -217,7 +221,11 @@ func TestScriptContextV3(t *testing.T) {
}
scCborHex := hex.EncodeToString(scCbor)
if scCborHex != testDef.expectedCbor {
t.Fatalf("did not get expected ScriptContext CBOR\n got: %s\n wanted: %s", scCborHex, testDef.expectedCbor)
t.Fatalf(
"did not get expected ScriptContext CBOR\n got: %s\n wanted: %s",
scCborHex,
testDef.expectedCbor,
)
}
},
)
Expand Down
6 changes: 5 additions & 1 deletion ledger/common/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ func TestScriptRefDecodeEncode(t *testing.T) {
t.Fatalf("unexpected error: %s", err)
}
if hex.EncodeToString(scriptRefCbor) != testCborHex {
t.Fatalf("did not get expected CBOR\n got: %x\n wanted: %s", scriptRefCbor, testCborHex)
t.Fatalf(
"did not get expected CBOR\n got: %x\n wanted: %s",
scriptRefCbor,
testCborHex,
)
}
}

Expand Down