Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent scheduling network tx #538

Merged
7 commits merged into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/archethic/bootstrap/network_init.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ defmodule Archethic.Bootstrap.NetworkInit do
SharedSecrets.new_node_shared_secrets_transaction(
[Crypto.first_node_public_key()],
daily_nonce_seed,
secret_key
secret_key,
0
)

tx
Expand Down Expand Up @@ -149,7 +150,7 @@ defmodule Archethic.Bootstrap.NetworkInit do
def init_network_reward_pool() do
Logger.info("Create mining reward pool")

Reward.new_rewards_mint(@genesis_network_pool_amount)
Reward.new_rewards_mint(@genesis_network_pool_amount, 0)
|> self_validation()
|> self_replication()
end
Expand Down
6 changes: 1 addition & 5 deletions lib/archethic/oracle_chain.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ defmodule Archethic.OracleChain do
alias __MODULE__.Summary

alias Archethic.TransactionChain.Transaction
alias Archethic.TransactionChain.Transaction.ValidationStamp

alias Crontab.CronExpression.Parser, as: CronParser
alias Crontab.Scheduler, as: CronScheduler
Expand Down Expand Up @@ -79,11 +78,8 @@ defmodule Archethic.OracleChain do
Load the transaction in the memtable
"""
@spec load_transaction(Transaction.t()) :: :ok
def load_transaction(
tx = %Transaction{type: :oracle, validation_stamp: %ValidationStamp{timestamp: timestamp}}
) do
def load_transaction(tx = %Transaction{type: :oracle}) do
MemTableLoader.load_transaction(tx)
Scheduler.ack_transaction(timestamp)
end

def load_transaction(tx = %Transaction{type: :oracle_summary}) do
Expand Down
Loading