Wallet merging of copies

Open
#70 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Start with the Wallet.merge() and Remote.pull() entry points, then inspect the Copies type and compare the linked Ruby merge implementation. Done means Wallet.merge(Copies) owns sorting and transaction merging, while Remote.pull() no longer sorts explicitly.

Written by the indexing model from the issue text.

Description

bug scope

According to the whitepaper merging of two wallets is an operation of merging copies into a local one.
Merge algorithm first sorts the copies and then merges transactions from that copies.
Currently, sorting is done outside Wallet.merge() method. It is part of Remote.pull() method.
I propose to add an additional method to Wallet : Wallet merge(Copies copies) and remove explicit sorting from Remote.pull().
Similar to what we have in ruby version

Dominant language
Java
Stars
22
Forks
14
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from zold-io/java-api

All issues in zold-io/java-api

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.