Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
BroProgramerWeb3 committed Dec 28, 2023
1 parent 934d379 commit a5858c1
Show file tree
Hide file tree
Showing 1,956 changed files with 56,466 additions and 84,272 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
*node_modules*
.cache/
Binary file added .parcel-cache/060ee06a7bb01f04-0
Binary file not shown.
Binary file added .parcel-cache/14630c43acf379e6-0
Binary file not shown.
Binary file added .parcel-cache/1e2d56da5318e48a-0
Binary file not shown.
Binary file added .parcel-cache/265c33d8f68b7e02-0
Binary file not shown.
Binary file added .parcel-cache/4ad8c54042098ae4-0
Binary file not shown.
2 changes: 2 additions & 0 deletions .parcel-cache/54fc73c5b694d9db.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
17320523
1703731845811546000
Binary file added .parcel-cache/bad384d61fa04477-0
Binary file not shown.
2 changes: 2 additions & 0 deletions .parcel-cache/d7bac9c9dfa5cef2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
17335936
1703732238723901000
Binary file added .parcel-cache/data.mdb
Binary file not shown.
Binary file added .parcel-cache/lock.mdb
Binary file not shown.
8 changes: 2 additions & 6 deletions blockchain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Blockchain {
this.chain = chain;
}

validTransactionData({ chain}) {
validTransactionData({ chain }) {
for (let i=1; i<chain.length; i++) {
const block = chain[i];
const transactionSet = new Set();
Expand All @@ -49,15 +49,11 @@ class Blockchain {
if (transaction.input.address === REWARD_INPUT.address) {
rewardTransactionCount += 1;

if(rewardTransactionCount > 1) {
if (rewardTransactionCount > 1) {
console.error('Miner rewards exceed limit');
return false;
}

// if (Object.values(transaction.outputMap['foo-bar'])[0] !== MINING_REWARD) {
// console.error('Miner reward amount is invalid');
// return false;
// }
if (Object.values(transaction.outputMap)[0] !== MINING_REWARD) {
console.error('Miner reward amount is invalid');
return false;
Expand Down
2 changes: 2 additions & 0 deletions client/dist/index.4d3a8b7b.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/dist/index.4d3a8b7b.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit a5858c1

Please sign in to comment.