-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make txns.txt to loop over txns in mempool
- Loading branch information
1 parent
41ad603
commit 331b9b0
Showing
5 changed files
with
16,290 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
#include <iostream>//damn! the steam is really I/O stream! | ||
#include <iostream>//damn! the stream is really I/O stream! | ||
#include <fstream> | ||
#include <string> | ||
#include <vector> | ||
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"; | ||
|
||
ifstream myfile; | ||
myfile.open("txns.txt"); | ||
string mystring; | ||
|
||
vector<string> txns; | ||
|
||
while (myfile.good()) { | ||
getline(myfile,mystring); | ||
txns.push_back(mystring); | ||
} | ||
myfile.close(); | ||
|
||
for (string txn: txns) { | ||
string filename = "mempool/" + txn; | ||
myfile.open(filename); | ||
//getline(myfile,mystring); | ||
//cout<<mystring<<'\n'; | ||
} | ||
return 0; | ||
} |
Oops, something went wrong.