Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Commit

Permalink
Support of 8 bytes Payment ID added in wallet rpc interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain Dero committed Nov 3, 2018
1 parent 06df0d7 commit a0871e6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ import "github.com/blang/semver"

// right now it has to be manually changed
// do we need to include git commitsha??
var Version = semver.MustParse("2.1.5-0.alpha.atlantis+10102018")
var Version = semver.MustParse("2.1.5-1.alpha.atlantis+03112018")
2 changes: 1 addition & 1 deletion walletapi/rpc_transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (h Transfer_Handler) ServeJSONRPC(c context.Context, params *fastjson.RawMe
rlog.Debugf("Len destinations %d %+v", len(p.Destinations), p)

payment_id := p.Payment_ID
if len(payment_id) > 0 && len(payment_id) != 64 {
if len(payment_id) > 0 && (len(payment_id) == 64 || len(payment_id) == 16) != true {
return nil, jsonrpc.ErrInvalidParams() // we should give invalid payment ID
}
if _, err := hex.DecodeString(p.Payment_ID); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion walletapi/rpc_transfersplit.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (h TransferSplit_Handler) ServeJSONRPC(c context.Context, params *fastjson.

unlock_time := p.Unlock_time
payment_id := p.Payment_ID
if len(payment_id) > 0 && len(payment_id) != 64 {
if len(payment_id) > 0 && (len(payment_id) == 64 || len(payment_id) == 16) != true {
return nil, jsonrpc.ErrInvalidParams() // we should give invalid payment ID
}
if _, err := hex.DecodeString(p.Payment_ID); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion walletapi/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ func (w *Wallet) Clean() {
w.delete_bucket(BLOCKCHAIN_UNIVERSE, []byte(FUNDS_SPENT_WHERE))
w.delete_bucket(BLOCKCHAIN_UNIVERSE, []byte(FUNDS_BUCKET_OUTGOING))

w.delete_bucket(BLOCKCHAIN_UNIVERSE, []byte(RING_BUCKET))
// w.delete_bucket(BLOCKCHAIN_UNIVERSE, []byte(RING_BUCKET)) //Improves wallet rescan performance.
w.delete_bucket(BLOCKCHAIN_UNIVERSE, []byte(KEYIMAGE_BUCKET))
w.delete_bucket(BLOCKCHAIN_UNIVERSE, []byte(HEIGHT_TO_BLOCK_BUCKET))

Expand Down

0 comments on commit a0871e6

Please sign in to comment.