Page MenuHomePhabricator

Refactor transaction creation and transaction funding logic
ClosedPublic

Authored by deadalnix on Wed, Oct 23, 17:44.

Details

Summary

In preparation for more create transaction and fund transcation RPCs,
refactor the transaction creation and funding logic into separate
functions.

This is a partial backport of Core PR13557 : https://github.com/bitcoin/bitcoin/pull/13557/commits/58a8e28918025c28f19ba19cbaa4a72374162942

Test Plan
make check
./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Wed, Oct 23, 17:44
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Oct 23, 17:44
Fabien requested changes to this revision.Thu, Oct 24, 10:00
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/rpc/rawtransaction.cpp
593 ↗(On Diff #13669)

No longer here, remove.

This revision now requires changes to proceed.Thu, Oct 24, 10:00
deadalnix added inline comments.Sun, Oct 27, 22:51
src/rpc/rawtransaction.cpp
593 ↗(On Diff #13669)

This is in the original material and in the back ported PR, so why is that something to be changed?

deadalnix updated this revision to Diff 13722.Sun, Oct 27, 23:24

rebase, ping?

Fabien requested changes to this revision.Mon, Oct 28, 07:13
Fabien added inline comments.
src/rpc/rawtransaction.cpp
422 ↗(On Diff #13669)

Here

586 ↗(On Diff #13669)

Nit: move comment above

593 ↗(On Diff #13669)

Unless I'm blind, this is moved in the original PR, and duplicated in this diff.

This revision now requires changes to proceed.Mon, Oct 28, 07:13
deadalnix added inline comments.Tue, Oct 29, 01:37
src/rpc/rawtransaction.cpp
593 ↗(On Diff #13669)

I see. Let me fix this.

deadalnix added inline comments.Tue, Oct 29, 02:34
src/rpc/rawtransaction.cpp
586 ↗(On Diff #13669)

Because the comment relates to UniValueType, it's better here. Putting it before just don't layout properly.

deadalnix updated this revision to Diff 13738.Tue, Oct 29, 02:35

Move outputs_is_obj business instead of copying it.

Fabien accepted this revision.Tue, Oct 29, 07:01
This revision is now accepted and ready to land.Tue, Oct 29, 07:01