Skip to content

Commit 091be68

Browse files
authoredOct 15, 2021
fix readme
fix
1 parent 1cb0907 commit 091be68

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ data, err := ioutil.ReadFile("./2.3MBPhoto.jpg")
217217
if err != nil {
218218
return
219219
}
220-
tx.LastTx = anchor
220+
221221
reward, err := w.Client.GetTransactionPrice(data, nil)
222222
if err != nil {
223223
return
@@ -232,6 +232,10 @@ tx := &types.Transaction{
232232
DataSize: fmt.Sprintf("%d", len(data)),
233233
Reward: fmt.Sprintf("%d", reward*(100+speedFactor)/100),
234234
}
235+
236+
tx.LastTx = anchor
237+
tx.Owner = utils.Base64Encode(w.PubKey.N.Bytes())
238+
235239
if err = utils.SignTransaction(tx, w.PubKey, w.PrvKey); err != nil {
236240
return
237241
}

0 commit comments

Comments
 (0)