From 331b9b06f59926f56e0b69353a07d844f4c9558b Mon Sep 17 00:00:00 2001 From: Garima Chauhan Date: Mon, 8 Apr 2024 15:16:44 +0530 Subject: [PATCH] make txns.txt to loop over txns in mempool --- Doc.md | 5 +- mine | Bin 16464 -> 40360 bytes mine.cpp | 27 +- output.txt | 8132 +++++++++++++++++++++++++++++++++++++++++++++++++++- txns.txt | 8131 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 16290 insertions(+), 5 deletions(-) create mode 100644 txns.txt diff --git a/Doc.md b/Doc.md index 6d19dcf..2e1178a 100644 --- a/Doc.md +++ b/Doc.md @@ -14,4 +14,7 @@ Second, we need to validate the transactions using that info, but then how do we 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 \ No newline at end of file +We need to output the coinbase txn also + + +// since cpp doesn't have a function for iterating over files in a directory had to make "txns.txt". \ No newline at end of file diff --git a/mine b/mine index c1941de5593e7653f7b601ff88af82de8f5971ea..1e58b5d4b940355dea370cbe63660cb94445c2d6 100755 GIT binary patch literal 40360 zcmeHw4SZD9weOjHl%Pn01&jDKd?^%(nGhhLXfO;+BtRsIwF;h0CPOlpBr{AV5UeOR z(8n~SkM@dkTlyZox3~4aeqnFr$8FWd&(PLVeAg=N^&{=oIw`0zRhxRb%>A#u*FLl7 zFo%n|;r`zH{c<#{v)5XC?X}lld+m>N&g}cVmCLhSE<;_}#*GH04$P34GA2B{mu~>d zj8fww{OdNZGCqNHj=)KJnFOH9>v&c=%wv2uAmy7(HyPmN5^X4`G$cs*oUW=#lA@qd zAk&mDmu}tk4=%U(*Mg5@8EY6$c~zXR ztW1b8?68LGr=TkDR^%hQoa@ErG}dx?PVKOZ>#ZR930>DUhw2xUT-V$%w>i|>-Z8hM zbiv#OC53I_!eT)uz1;Yt=3BA4)_~eQgky0=)^?dz@`yH(>BRrg%helBe>ndaZROi1 zf8pK_9?gH^tN%beq&MXu9=b>#o5V_g8h6A)_9!qOF_B?oj?H>XP{O%;8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;x z@UMmv1t((Vu@5~ylD3`r9tEK2ly>j766)ecd)vv{3EFC3gk>^s@5$sx;u$;X0HW6 zjE(6X`~4lZoz9aD)b@x?+v*)`)F&iO`|Y9O$Ur=o#7O~c-Y+Gz-kMG;drSYVU7h`) zlt%16TkpiT?ahOo+j{NZ?LBnBz{ZgeyEn#QtY=W!Jzv@0xvj6;W#77a^HA@wJ>1#V z-)r-x{iy86r%m{FDj9d;IFN8F+Llb`>{2n6glq4afJ%a$EavS|G?~sZP^4h(J2K!B zu;bsjGN%SyT-W^RPBa)Fe6oO#CRF-0;kI$$LIQ=F^jU`rE(QmBZVoyi3_0rcNUY)I9zN=XN0q}MpX9(tMMcUg?#nvy5lE+C| zo{qk2c$56S6O865UcSteM25wXrJsL0@PA-#D(#o~yU14N@ig{B?T@3J=I+9m`Mt;v z3N8}0k+RZ%nP;bg(bP`(vR)7=>jRkR#O_2@_aH}eZ{f>)TcoU8r2S$i@&WK^E-$*w z=S2>1O%h{izck<=G89wc%lblOm>Vqh3t#&GUFLVOLs_qg+{HNYiR0)002oyv{@r;3 z&lhAJ2NRwA_y7Aqz5FoqL`wge?su=A^zp}-FOpTEe~5q7$Dd$=$f(OS8Sy9bSs#Cz z3q(G_@fSD36P@PO-u}zHPo%7q#oiyk-!Nb9zY4P@OIb%Us>h1tN&X%e)i3;T7z&ce z9;3Ry{`&un5-)!=Y)nPI?lMhA#*e_SA%nfY`WYll*8g(;)gLe6i+l^5Mh{=sMN=*0 z?c#Vf+C^RXAE1E7uDibHb9Zu{Spq}PA0^>QyM6+U`tS1j{{x5DlC@H!M!3Ji7kLTD zUcQR5X{(V^k2nyX=<`7)OzMwDO-U2;?;z)%6!qjOOY18#VRN@s_-kCmWW=3U%GmLm zM%iHp514CENdHrj_RIU{Qee_{FMqt//damn! the steam is really I/O stream! +#include //damn! the stream is really I/O stream! +#include +#include +#include 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 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<