File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const (
33
33
//
34
34
// DO NOT CHANGE ORDER - aligned for memory optimization (malign)
35
35
type Tx struct {
36
- bpu.BpuTx
36
+ bpu.Tx
37
37
}
38
38
39
39
// NewFromBytes creates a new BOB Tx from a NDJSON line representing a BOB transaction,
@@ -70,7 +70,7 @@ func NewFromTx(tx *bt.Tx) (bobTx *Tx, err error) {
70
70
71
71
// FromBytes takes a BOB formatted tx string as bytes
72
72
func (t * Tx ) FromBytes (line []byte ) error {
73
- tu := new (bpu.BpuTx )
73
+ tu := new (bpu.Tx )
74
74
if err := json .Unmarshal (line , & tu ); err != nil {
75
75
return fmt .Errorf ("error parsing line: %v, %w" , line , err )
76
76
}
@@ -100,7 +100,8 @@ func (t *Tx) FromBytes(line []byte) error {
100
100
t .In = tu .In
101
101
t .Lock = tu .Lock
102
102
t .Out = fixedOuts
103
- t .Tx = tu .Tx
103
+
104
+ t .Tx .Tx = tu .Tx
104
105
105
106
// Check for missing hex values and supply them
106
107
for outIdx , out := range t .Out {
@@ -169,7 +170,7 @@ func (t *Tx) FromRawTxString(rawTxString string) (err error) {
169
170
170
171
bpuTx , err := bpu .Parse (bpu.ParseConfig {RawTxHex : & rawTxString , SplitConfig : splitConfig })
171
172
if bpuTx != nil {
172
- t .BpuTx = * bpuTx
173
+ t .Tx = * bpuTx
173
174
}
174
175
175
176
return
@@ -210,7 +211,7 @@ func (t *Tx) FromTx(tx *bt.Tx) error {
210
211
return err
211
212
}
212
213
if bpuTx != nil {
213
- t .BpuTx = * bpuTx
214
+ t .Tx = * bpuTx
214
215
}
215
216
return nil
216
217
}
You can’t perform that action at this time.
0 commit comments