Skip to content

Commit e3f275b

Browse files
authored
fix: use Id instead of Hash for transactions (#1202)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 1389c51 commit e3f275b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/tx-submission/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func main() {
141141
// Wait until we're done
142142
<-doneChan
143143

144-
fmt.Printf("Successfully sent transaction %x\n", tx.Hash())
144+
fmt.Printf("Successfully sent transaction %x\n", tx.Id())
145145

146146
if err := o.Close(); err != nil {
147147
fmt.Printf("ERROR: failed to close connection: %s\n", err)

ledger/common/script/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func NewTxInfoV3FromTransaction(
209209
Signatories: signatoriesInfo(tx.RequiredSigners()),
210210
Redeemers: redeemers,
211211
Data: tmpData,
212-
Id: tx.Hash(),
212+
Id: tx.Id(),
213213
Votes: votes,
214214
ProposalProcedures: proposalProcedures,
215215
}

ledger/conway/conway_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func TestConwayTx_Utxorpc(t *testing.T) {
179179
t.Fatalf("failed to convert Conway tx to utxorpc: %v", err)
180180
}
181181

182-
expHash := tx.Hash().Bytes()
182+
expHash := tx.Id().Bytes()
183183
if !bytes.Equal(utxoTx.Hash, expHash) {
184184
t.Errorf("tx hash mismatch\nexpected: %x\nactual : %x", expHash, utxoTx.Hash)
185185
}

0 commit comments

Comments
 (0)