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

Fixed Ledger Manager Issues #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fantypants
Copy link
Contributor

Fixed Issues for transaction inputs on initialization of blocks.
Fixed block before 0 issue in ledger manager

@@ -28,7 +28,8 @@ defmodule Miner.Mixfile do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:elixium_core, "~> 0.3"},
{:local_dependency, path: "../elixium_core", app: false},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not commit this

|> Enum.flat_map(&(&1.inputs))
|> Enum.map(&(Map.delete(&1, :signature)))
block.transactions
|> Enum.flat_map(&(&1.inputs))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use pipes when there is only one function

@@ -164,6 +164,8 @@ defmodule Miner.LedgerManager do
|> Kernel.+(1)
|> Range.new(:binary.decode_unsigned(Ledger.last_block().index))
|> Enum.map(&Ledger.block_at_height/1)
|> IO.inspect
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray IO.inspect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants