Skip to content

Conversation

jonasschnelli
Copy link
Contributor

This simple change would allow other wallets/signal listeners to providing a scripts for the coinbase output. Currently the main wallet will always overwrite a possible available script.

Without this PR, RPC test for the new wallet would require to send in funds mined of ther current wallet.

…overwritten

This simple change would allow other wallets to providing a scripts for the coinbase output. Currently the main wallet will always overwrite a available script.

Without this PR, RPC test for the new wallet would require to send in funds mined of ther current wallet.
@btcdrak
Copy link
Contributor

btcdrak commented Aug 15, 2015

utACK

@sipa
Copy link
Member

sipa commented Aug 15, 2015

Seems strange to put this reponsibility in the wallet, as it means that probably every alternative provider for scripts would also need this logic.

I think it's better to institute a rule that there can be at most one provider. You can probably easily implement that as a combiner for the boost signal, making it fail when more than one called handler returns true. That way it becomes the responsibility of the one who registers the providers, rather than of every provider itself.

Not a NAK though, if this is the easiest solution, ok.

@luke-jr
Copy link
Member

luke-jr commented Dec 28, 2015

What @sipa said.

@laanwj
Copy link
Member

laanwj commented Apr 25, 2016

I think it's better to institute a rule that there can be at most one provider

Yes, I had a similar comment. It's a bit strange to put the responsibility for not returning multiple scripts in the providers.

The need for a circuitous design like this seems to indicate there is a level violation though. Maybe mining-to-wallet call should be part of the wallet API? Then there is no need to register anything at all.

@laanwj
Copy link
Member

laanwj commented Apr 28, 2016

My proposal would be to move generate to the wallet (as it needs a wallet, implicitly, anyway), and keep generatetoaddress in the core. See #7965.

@jonasschnelli
Copy link
Contributor Author

My proposal would be to move generate to the wallet (as it needs a wallet, implicitly, anyway), and keep generatetoaddress in the core. See #7965.

Agree with @laanwj.
Closing.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants