Removed debugging log

This commit is contained in:
obscuren
2014-04-30 17:43:48 +02:00
parent c3293641e7
commit d2ab322267
2 changed files with 14 additions and 20 deletions

View File

@@ -91,14 +91,16 @@ func (pool *TxPool) addTransaction(tx *Transaction) {
// Process transaction validates the Tx and processes funds from the
// sender to the recipient.
func (pool *TxPool) ProcessTransaction(tx *Transaction, block *Block, toContract bool) (err error) {
defer func() {
if r := recover(); r != nil {
log.Println(r)
err = fmt.Errorf("%v", r)
}
}()
/*
defer func() {
if r := recover(); r != nil {
log.Println(r)
err = fmt.Errorf("%v", r)
}
}()
*/
// Get the sender
sender := block.state.GetStateObject(tx.Sender())
sender := block.state.GetAccount(tx.Sender())
if sender.Nonce != tx.Nonce {
return fmt.Errorf("[TXPL] Invalid account nonce, state nonce is %d transaction nonce is %d instead", sender.Nonce, tx.Nonce)
@@ -112,7 +114,7 @@ func (pool *TxPool) ProcessTransaction(tx *Transaction, block *Block, toContract
}
// Get the receiver
receiver := block.state.GetStateObject(tx.Recipient)
receiver := block.state.GetAccount(tx.Recipient)
sender.Nonce += 1
// Send Tx to self