Page 1 of 1

Can you do the function addTransaction() ,isChainValid,minePendingTransactions,getBalanceOfAddress,prettyPrint​​​​​​​ na

Posted: Wed Apr 27, 2022 5:04 pm
by answerhappygod
Can you do
the function addTransaction()
,isChainValid,minePendingTransactions,getBalanceOfAddress,prettyPrint​​​​​​​
namespace ra :: BlockChain
Aim:
To create an iterable blockchain, which could work with an
extendable transaction class. Here the
link GitHub repo!
Blockchain in Brief:
Scope of this Project:
Plan of Attack:
Setup
Lets Setup the extra files!
RSA: Library will be used for signing and verification of
transactions.
Create a includes folder and add files
from Github
not_implemented_exception: The exception that is thrown when a
requested method or operation is not implemented.
base_transaction<EncryptionAlgo>
Here are the required things:
Every Function logic will be same, which is to
throw not_implemented_exception, for example:
custom_transaction : public
base_transaction<EncryptionAlgo>
Private Members:
Public Members:
Here are some Pointers regarding signing
block <Transaction, HashFunctionClass>
NOTES:
A block typically contains the following:
hash_function is an instance of template class used for all
hashing related needs (std::hash used in main.cpp)
Proof of Work:
In BitCoin:
In namespace::ra :
block_chain <Transaction, HashFunctionClass>
Well as the name states it is a chain of blocks, So Naturally,
It will contain the same Template Arguments as Block
Private Members:
Public Members:
Iterator Class (To make iteration easy)
Private:
Public:
block_chain(diffuculty, verfication_function,
minning_reward)Constructor:
get_balance():
add_transaction(temp)
mine_pending_transactions(minning_reward_address)
is_chain_valid()