i need to implement following functions:
BlockChain BlockChainLoad(std::ifstream& file)
void BlockChainAppendTransaction( BlockChain& blockChain, const Transaction& transaction, const string& timestamp
i can adjust the struct of blockchain as i wish, so each new block will be connected to the previous once(and contain transaction ,time ).
i tried 2 ways :
1)blockchain struct will have 2 pointers , next and previous.
2)creat new struct that will contain only a pointer to head of some blockchain.
with both ways i still cannot implement the requseted function as needed.
what is the best approach to such problem?
i cannot change ethe functions declaration .
user25778822 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.