[Qt] add verifySize() function to PaymentServer - #5665
Conversation
|
I would also strongly recommend to add a Unit-Test for |
|
@jonasschnelli As |
|
@Diapolo IMO we should add the 50001 bytes test. You might use this forged payment request http://jonasschnelli.ch/r1422608371.bitcoinpaymentrequest I also tried to test |
|
@jonasschnelli I'm fine with directly using What do you mean by |
|
@Diapolo: sounds even better. I would recommend to just pass 50001 bytes through |
|
@jonasschnelli Updated, I hope this is fine now? |
|
tested ACK |
|
Anything left to do for me to get this and other related pulls merged ;)? |
|
Ping |
|
@laanwj Mind giving this the final ACK ;)? |
|
ReACK |
|
@laanwj ping |
There was a problem hiding this comment.
To be able to make readPaymentRequestFromFile private again, which I changed once and wasn't happy with it :). The function could also fail, if the file failed to open, which isn't what this test is for anyway.
There was a problem hiding this comment.
If you want to be able to test a private methods you could use a friend class / function. E.g. inside the class do
friend class PaymentServerTester;
Then do the testing in a class PaymentServerTester.
There was a problem hiding this comment.
@laanwj It's not necessary here, but thanks for that C++ lesson :).
|
@jonasschnelli Maybe you can help me understand what's preventing this pull from getting merged? |
|
@laanwj @jonasschnelli Ping |
|
@Diapolo because you removed the test for, unrelated, PaymentServer::readPaymentRequestFromFile |
|
@laanwj As I said, I just made |
|
ut ACK |
|
@laanwj Fixed merge-conflict, ready now. |
- add static verifySize() function to PaymentServer and move the logging on error into the function - also use the new function in the unit test - the function checks if the size is allowed as per BIP70
|
@laanwj Ping |
|
Final ping! |

on error into the function