Skip to content

Commit

Permalink
changed language to c++
Browse files Browse the repository at this point in the history
  • Loading branch information
110CodingP committed Apr 7, 2024
1 parent 0d32306 commit 41ad603
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
16 changes: 15 additions & 1 deletion Doc.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Sources consulted
Bitcoin Stack Exchange (Bitcoin related resources)
Odin Project (Web related resources)
Odin Project (Web related resources)
LeftAsExercise
bitcoin repo

# Thinking Process
First, we need to parse the json files to get the required info.
Second, we need to validate the transactions using that info, but then how do we order the transactions?
//serialise
//dp problem (recursively build utxo)



Third,build the block
Fourth, we need to find the nonce which passes difficulty and hence the hash
We need to output the coinbase txn also
8 changes: 0 additions & 8 deletions index.js

This file was deleted.

Binary file added mine
Binary file not shown.
11 changes: 11 additions & 0 deletions mine.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <iostream>//damn! the steam is really I/O stream!
using namespace std;

//create a serialise function to serialise txns

int main() {
//use freopen etc. to read json files
freopen("output.txt","w",stdout);
cout<<"Hello World\n";
return 0;
}
1 change: 1 addition & 0 deletions output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello World
2 changes: 1 addition & 1 deletion run.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Update this file to run your own code
node index.js
./mine

0 comments on commit 41ad603

Please sign in to comment.