complete validation tests for txProposal SIGHASH
This commit is contained in:
parent
d7650f30ff
commit
b5c144d48c
4 changed files with 97 additions and 5 deletions
|
|
@ -125,6 +125,15 @@ Wallet.prototype._handleTxProposal = function(senderId, data) {
|
|||
this.log('RECV TXPROPOSAL:', data);
|
||||
|
||||
var inTxp = TxProposals.TxProposal.fromObj(data.txProposal);
|
||||
var valid = inTxp.isValid();
|
||||
if (!valid) {
|
||||
var corruptEvent = {
|
||||
type: 'corrupt',
|
||||
cId: inTxp.creator
|
||||
};
|
||||
this.emit('txProposalEvent', corruptEvent);
|
||||
return;
|
||||
}
|
||||
var mergeInfo = this.txProposals.merge(inTxp, senderId);
|
||||
var added = this.addSeenToTxProposals();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue