add bonder's signature to BondTx

This commit is contained in:
Ethan Buchman
2015-05-20 19:36:55 -04:00
parent f78bde2e3e
commit d43c776e84
4 changed files with 14 additions and 5 deletions
+3
View File
@@ -497,6 +497,9 @@ func ExecTx(blockCache *BlockCache, tx_ types.Tx, runCall bool, evc events.Firea
if err := tx.PubKey.ValidateBasic(); err != nil {
return err
}
if !tx.PubKey.VerifyBytes(signBytes, tx.Signature) {
return types.ErrTxInvalidSignature
}
outTotal, err := validateOutputs(tx.UnbondTo)
if err != nil {
return err
+2
View File
@@ -288,6 +288,7 @@ func TestTxs(t *testing.T) {
},
},
}
tx.Signature = privAccounts[0].Sign(tx).(account.SignatureEd25519)
tx.Inputs[0].Signature = privAccounts[0].Sign(tx)
err := execTxWithState(state, tx, true)
if err != nil {
@@ -344,6 +345,7 @@ func TestAddValidator(t *testing.T) {
},
},
}
bondTx.Signature = acc0.Sign(bondTx).(account.SignatureEd25519)
bondTx.Inputs[0].Signature = acc0.Sign(bondTx)
// Make complete block and blockParts