Skip to content
Permalink
Browse files

wallet_rpc_server: fix get_bulk_payments with short payment ids

  • Loading branch information...
moneromooo-monero committed Jul 9, 2019
1 parent 9d7107c commit 3140a378da43ae71c26304543bd9631f9fcb252d
Showing with 8 additions and 0 deletions.
  1. +5 −0 src/wallet/wallet_rpc_server.cpp
  2. +3 −0 tests/functional_tests/transfer.py
@@ -1745,6 +1745,11 @@ namespace tools
else if (payment_id_str.size() == 2 * sizeof(payment_id8))
{
r = epee::string_tools::hex_to_pod(payment_id_str, payment_id8);
if (r)
{
memcpy(payment_id.data, payment_id8.data, 8);
memset(payment_id.data + 8, 0, 24);
}
}
else
{
@@ -519,6 +519,9 @@ def check_get_bulk_payments(self):
res = self.wallet[2].get_bulk_payments(payment_ids = ['1'*64, '1234500000012345abcde00000abcdeff1234500000012345abcde00000abcde', '2'*64])
assert len(res.payments) >= 1 # one tx was sent

res = self.wallet[1].get_bulk_payments(["1111111122222222"])
assert len(res.payments) >= 1 # we have one of these

def check_double_spend_detection(self):
print('Checking double spend detection')
txes = [[None, None], [None, None]]

0 comments on commit 3140a37

Please sign in to comment.
You can’t perform that action at this time.