Skip to content

Commit

Permalink
update sync:push_new_block_helper so that when we find a block, we pu…
Browse files Browse the repository at this point in the history
…sh the evidence of it to other nodes more aggressively.
  • Loading branch information
zack-bitcoin committed Oct 24, 2024
1 parent 77edc40 commit c2014f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion apps/amoveo_core/src/consensus/sync.erl
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ push_new_block(Block) ->
spawn(fun() -> push_new_block_helper(0, 0, shuffle(Pools), Hash, Headers) end),
spawn(fun() -> push_new_block_helper(0, 0, shuffle(Peers), Hash, Headers) end).
push_new_block_helper(_, _, [], _, _) -> ok;%no one else to give the block to.
push_new_block_helper(N, M, _, _, _) when ((M > 1) and ((N*2) > (M*1))) -> ok;%the majority of peers probably already know.
push_new_block_helper(N, M, _, _, _) when ((M > 1) and (((N-2)*2) > (M*1))) -> ok;%the majority of peers probably already know.
push_new_block_helper(N, M, [P|T], Hash, Headers) ->
X = remote_peer({header, Hash}, P),
{Top, Bottom} = case X of
Expand Down
11 changes: 0 additions & 11 deletions todo
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
now the mining pool isn't paying anything.
send the extra money to whoever was mining.



fix the mining pool so it doesn't over-pay.

get futarchy working.



check coinbase rewards to see if someone is secretly mining. amoveo_utils:recent_miners/1



get the server working to share off-chain contracts again.
* test it.

Expand Down

0 comments on commit c2014f8

Please sign in to comment.