diff --git a/src/CoiniumServ/Persistance/Redis/Redis.cs b/src/CoiniumServ/Persistance/Redis/Redis.cs index cefa4beac..4884754ed 100644 --- a/src/CoiniumServ/Persistance/Redis/Redis.cs +++ b/src/CoiniumServ/Persistance/Redis/Redis.cs @@ -119,8 +119,7 @@ public void AddBlock(IShare share) // add block to pending. var pendingKey = string.Format("{0}:blocks:pending", _coin); - // entry format: blockHash:txHash:Amount - var entry = string.Format("{0}:{1}:{2}", share.BlockHash.ToHexString(), share.Block.Tx.First(), share.GenerationTransaction.TotalAmount); + var entry = string.Format("{0}:{1}:{2}", share.BlockHash.ToHexString(), share.Block.Tx.First(), share.GenerationTransaction.TotalAmount); // entry format: blockHash:txHash:Amount _client.ZAdd(pendingKey, Tuple.Create(share.Block.Height, entry)); } @@ -235,7 +234,7 @@ public void MoveBlock(IPaymentRound round) break; } - var entry = string.Format("{0}:{1}", round.Block.BlockHash, round.Block.TransactionHash); + var entry = string.Format("{0}:{1}:{2}", round.Block.BlockHash, round.Block.TransactionHash, round.Block.Amount); // entry format: blockHash:txHash:Amount //_client.StartPipeTransaction(); // batch the commands as atomic. _client.ZRemRangeByScore(pendingKey, round.Block.Height, round.Block.Height); @@ -372,7 +371,7 @@ public IEnumerable GetBlocks(BlockStatus status) } catch (Exception e) { - _logger.Error("An exception occured while getting {0:l} blocks: {1:l}", status.ToString(), e.Message); + _logger.Error("An exception occured while getting {0:l} blocks: {1:l}", status.ToString().ToLower(), e.Message); } return blocks.Values.ToList();