@@ -119,8 +119,7 @@ public void AddBlock(IShare share)
119
119
120
120
// add block to pending.
121
121
var pendingKey = string . Format ( "{0}:blocks:pending" , _coin ) ;
122
- // entry format: blockHash:txHash:Amount
123
- var entry = string . Format ( "{0}:{1}:{2}" , share . BlockHash . ToHexString ( ) , share . Block . Tx . First ( ) , share . GenerationTransaction . TotalAmount ) ;
122
+ var entry = string . Format ( "{0}:{1}:{2}" , share . BlockHash . ToHexString ( ) , share . Block . Tx . First ( ) , share . GenerationTransaction . TotalAmount ) ; // entry format: blockHash:txHash:Amount
124
123
_client . ZAdd ( pendingKey , Tuple . Create ( share . Block . Height , entry ) ) ;
125
124
}
126
125
@@ -235,7 +234,7 @@ public void MoveBlock(IPaymentRound round)
235
234
break ;
236
235
}
237
236
238
- var entry = string . Format ( "{0}:{1}" , round . Block . BlockHash , round . Block . TransactionHash ) ;
237
+ var entry = string . Format ( "{0}:{1}:{2} " , round . Block . BlockHash , round . Block . TransactionHash , round . Block . Amount ) ; // entry format: blockHash:txHash:Amount
239
238
240
239
//_client.StartPipeTransaction(); // batch the commands as atomic.
241
240
_client . ZRemRangeByScore ( pendingKey , round . Block . Height , round . Block . Height ) ;
@@ -372,7 +371,7 @@ public IEnumerable<IPersistedBlock> GetBlocks(BlockStatus status)
372
371
}
373
372
catch ( Exception e )
374
373
{
375
- _logger . Error ( "An exception occured while getting {0:l} blocks: {1:l}" , status . ToString ( ) , e . Message ) ;
374
+ _logger . Error ( "An exception occured while getting {0:l} blocks: {1:l}" , status . ToString ( ) . ToLower ( ) , e . Message ) ;
376
375
}
377
376
378
377
return blocks . Values . ToList ( ) ;
0 commit comments