BitShares Forum
Main => Technical Support => Topic started by: xiaorui.dong on May 13, 2015, 06:49:44 am
-
Dear all,
I don't understand the source code in function "void wallet::sign_block( signed_block_header& header )":
FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash );
Why the header.previous_secret should Equal the prev_secret_hash?
And what situation can cause the exception of FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash )?
Thanks verymuch.
-
FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash );
Why the header.previous_secret should Equal the prev_secret_hash?
Actually it states that the HASH of the secret published in the previous block should equal the "previous secret hash".
This is for the random number generation in BitShares .. The delegates publish a HASH(secret) and reveal
the secret in the block they sign next. Thus you get verifiable secret hashes on the blockchain from the delegates
And what situation can cause the exception of FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash )?
Where do you see this exception? On a delegate machine or a client? In what context?
-
FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash );
Why the header.previous_secret should Equal the prev_secret_hash?
Actually it states that the HASH of the secret published in the previous block should equal the "previous secret hash".
This is for the random number generation in BitShares .. The delegates publish a HASH(secret) and reveal
the secret in the block they sign next. Thus you get verifiable secret hashes on the blockchain from the delegates
And what situation can cause the exception of FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash )?
Where do you see this exception? On a delegate machine or a client? In what context?
On a delegate machine
-
FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash );
Why the header.previous_secret should Equal the prev_secret_hash?
Actually it states that the HASH of the secret published in the previous block should equal the "previous secret hash".
This is for the random number generation in BitShares .. The delegates publish a HASH(secret) and reveal
the secret in the block they sign next. Thus you get verifiable secret hashes on the blockchain from the delegates
And what situation can cause the exception of FC_ASSERT( fc::ripemd160::hash( header.previous_secret ) == *prev_secret_hash )?
Where do you see this exception? On a delegate machine or a client? In what context?
On a delegate machine
I build 10 test node(client with delegate account).Then 5 delegate (last created block number is 6,5,4,3 and 2) cannot build new block.I think they are in a same block chain.But I don't know why the delegate have this exception.If another client with other block chain connect it, does it affect these delegate?