Skip to content
This repository has been archived by the owner on Oct 24, 2019. It is now read-only.

Commit

Permalink
Merge pull request #16 from lochjin/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
lochjin authored Aug 22, 2019
2 parents 7f3f9fb + 9211fdd commit 4113374
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/handle_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TxDecode(network string, rawTxStr string) {

jsonTx := &json.OrderedResult{
{Key: "txid", Val: tx.TxHash().String()},
{Key: "txhash", Val: tx.TxHashFull().String()},
{Key: "txhash", Val: tx.TxHash().String()},
{Key: "version", Val: int32(tx.Version)},
{Key: "locktime", Val: tx.LockTime},
{Key: "expire", Val: tx.Expire},
Expand Down Expand Up @@ -74,7 +74,7 @@ func TxEncode(version TxVersionFlag, lockTime TxLockTimeFlag, txIn TxInputsFlag,
ErrExit(err)
}
prevOut := types.NewOutPoint(txHash, input.index)
txIn := types.NewTxInput(prevOut, types.NullValueIn, []byte{})
txIn := types.NewTxInput(prevOut,[]byte{})
txIn.Sequence = input.sequence
if lockTime != 0 {
txIn.Sequence = types.MaxTxInSequenceNum - 1
Expand Down Expand Up @@ -114,7 +114,7 @@ func TxEncode(version TxVersionFlag, lockTime TxLockTimeFlag, txIn TxInputsFlag,
txOut := types.NewTxOutput(uint64(atomic), pkScript)
mtx.AddTxOut(txOut)
}
mtxHex, err := mtx.Serialize(types.TxSerializeNoWitness)
mtxHex, err := mtx.Serialize()
if err != nil {
ErrExit(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/Qitmeer/qx
go 1.12

require (
github.com/Qitmeer/qitmeer-lib v0.0.0-20190821053846-bf695e5493d1
github.com/Qitmeer/qitmeer-lib v0.0.0-20190822144243-f312929778d5
github.com/pkg/errors v0.8.1
github.com/stretchr/testify v1.3.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/Qitmeer/qitmeer-lib v0.0.0-20190821053846-bf695e5493d1 h1:kMzA31wyrFAQ6b8HuVstU+5jtZHa5ZRkMycI3bTJ+Qw=
github.com/Qitmeer/qitmeer-lib v0.0.0-20190821053846-bf695e5493d1/go.mod h1:qQJR7/HBuObR1j4+dt6hLCQ8ZxiyuXjaK8ePeptriJk=
github.com/Qitmeer/qitmeer-lib v0.0.0-20190822144243-f312929778d5 h1:bJA+bSbIMX8gd2KoyTCfZEymLwX2RTUSqmj/uTbb91E=
github.com/Qitmeer/qitmeer-lib v0.0.0-20190822144243-f312929778d5/go.mod h1:qQJR7/HBuObR1j4+dt6hLCQ8ZxiyuXjaK8ePeptriJk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dchest/blake256 v1.0.0/go.mod h1:xXNWCE1jsAP8DAjP+rKw2MbeqLczjI3TRx2VK+9OEYY=
Expand Down

0 comments on commit 4113374

Please sign in to comment.