Clean code more

This commit is contained in:
MoneroOcean
2018-03-25 11:06:53 +02:00
parent 7e9e43c151
commit 9b9f765404
2 changed files with 7 additions and 7 deletions

View File

@@ -260,7 +260,7 @@ namespace cryptonote
//--------------------------------------------------------------- //---------------------------------------------------------------
uint64_t get_block_height(const block& b) uint64_t get_block_height(const block& b)
{ {
CHECK_AND_ASSERT_MES(b.miner_tx.vin.size() == 1, 0, "wrong miner tx in block: " << get_block_hash(b) << ", b.miner_tx.vin.size() != 1"); //CHECK_AND_ASSERT_MES(b.miner_tx.vin.size() == 1, 0, "wrong miner tx in block: " << get_block_hash(b) << ", b.miner_tx.vin.size() != 1");
CHECKED_GET_SPECIFIC_VARIANT(b.miner_tx.vin[0], const txin_gen, coinbase_in, 0); CHECKED_GET_SPECIFIC_VARIANT(b.miner_tx.vin[0], const txin_gen, coinbase_in, 0);
return coinbase_in.height; return coinbase_in.height;
} }
@@ -503,7 +503,7 @@ namespace cryptonote
return blob; return blob;
} }
//--------------------------------------------------------------- //---------------------------------------------------------------
bool get_block_hash(const block& b, crypto::hash& res) /*bool get_block_hash(const block& b, crypto::hash& res)
{ {
blobdata blob; blobdata blob;
if (!get_block_hashing_blob(b, blob)) if (!get_block_hashing_blob(b, blob))
@@ -521,14 +521,14 @@ namespace cryptonote
} }
return get_object_hash(blob, res); return get_object_hash(blob, res);
} }*/
//--------------------------------------------------------------- //---------------------------------------------------------------
crypto::hash get_block_hash(const block& b) /*crypto::hash get_block_hash(const block& b)
{ {
crypto::hash p = null_hash; crypto::hash p = null_hash;
get_block_hash(b, p); get_block_hash(b, p);
return p; return p;
} }*/
//--------------------------------------------------------------- //---------------------------------------------------------------
bool get_block_header_hash(const block& b, crypto::hash& res) bool get_block_header_hash(const block& b, crypto::hash& res)
{ {

View File

@@ -81,8 +81,8 @@ namespace cryptonote
bool get_block_hashing_blob(const block& b, blobdata& blob); bool get_block_hashing_blob(const block& b, blobdata& blob);
bool get_bytecoin_block_hashing_blob(const block& b, blobdata& blob); bool get_bytecoin_block_hashing_blob(const block& b, blobdata& blob);
blobdata get_block_hashing_blob(const bb_block& b); blobdata get_block_hashing_blob(const bb_block& b);
bool get_block_hash(const block& b, crypto::hash& res); //bool get_block_hash(const block& b, crypto::hash& res);
crypto::hash get_block_hash(const block& b); //crypto::hash get_block_hash(const block& b);
bool get_block_header_hash(const block& b, crypto::hash& res); bool get_block_header_hash(const block& b, crypto::hash& res);
bool get_block_longhash(const block& b, crypto::hash& res, uint64_t height); bool get_block_longhash(const block& b, crypto::hash& res, uint64_t height);
crypto::hash get_block_longhash(const block& b, uint64_t height); crypto::hash get_block_longhash(const block& b, uint64_t height);