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

Commit

Permalink
Version 2.1.3-0.alpha.atlantis+28092018
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain Dero committed Sep 28, 2018
1 parent cf4c311 commit 41760bc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 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.2-1.alpha.atlantis+28092018")
var Version = semver.MustParse("2.1.3-0.alpha.atlantis+28092018")
39 changes: 17 additions & 22 deletions walletapi/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,29 +430,24 @@ func (w *Wallet) Add_Transaction_Record_Funds(txdata *globals.TX_Output_Data) (a
if w.check_key_exists(BLOCKCHAIN_UNIVERSE, []byte(KEYIMAGE_BUCKET), kimage[:]) {
// find the output index to which this key image belong
value_bytes, err := w.load_key_value(BLOCKCHAIN_UNIVERSE, []byte(KEYIMAGE_BUCKET), kimage[:])
if err != nil {
panic(fmt.Sprintf("Error while reading keyimage data key_image %s, err %s", kimage, err))
}
index := binary.BigEndian.Uint64(value_bytes)

// now lets load the suitable index data
value_bytes, err = w.load_key_value(BLOCKCHAIN_UNIVERSE, []byte(FUNDS_BUCKET), itob(index))
if err != nil {
panic(fmt.Sprintf("Error while reading funds data key_image %s, index %d err %s", kimage, index, err))
}

var tx_wallet_temp TX_Wallet_Data
err = msgpack.Unmarshal(value_bytes, &tx_wallet_temp)
if err != nil {
panic(fmt.Sprintf("Error while decoding funds data key_image %s, index %d err %s", kimage, index, err))
}

if tx_wallet_temp.TXdata.TXID != txdata.TXID { // transaction mismatch
return 0, false
}
if err == nil && len(value_bytes) == 8 {
index := binary.BigEndian.Uint64(value_bytes)

// now lets load the suitable index data
value_bytes, err = w.load_key_value(BLOCKCHAIN_UNIVERSE, []byte(FUNDS_BUCKET), itob(index))
if err == nil {
var tx_wallet_temp TX_Wallet_Data
err = msgpack.Unmarshal(value_bytes, &tx_wallet_temp)
if err == nil {
if tx_wallet_temp.TXdata.TXID != txdata.TXID { // transaction mismatch
return 0, false
}

if tx_wallet_temp.TXdata.Index_within_tx != txdata.Index_within_tx { // index within tx mismatch
return 0, false
if tx_wallet_temp.TXdata.Index_within_tx != txdata.Index_within_tx { // index within tx mismatch
return 0, false
}
}
}
}

}
Expand Down

0 comments on commit 41760bc

Please sign in to comment.