Skip to content
Snippets Groups Projects
Commit d423363b authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

All callers now provide a store. Hooray.

parent 48d0f2e3
No related branches found
No related tags found
1 merge request!24Put ZKAPs into and take ZKAPs out of a database
......@@ -37,15 +37,12 @@ from ._base64 import (
urlsafe_b64decode,
)
from .model import (
VoucherStore,
)
from .controller import (
PaymentController,
NonRedeemer,
)
def from_configuration(node_config, store=None, redeemer=None):
def from_configuration(node_config, store, redeemer=None):
"""
Instantiate the plugin root resource using data from its configuration
section in the Tahoe-LAFS configuration file::
......@@ -58,8 +55,7 @@ def from_configuration(node_config, store=None, redeemer=None):
This is also used to read and write files in the private storage area
of the node's persistent state location.
:param VoucherStore store: The store to use. If ``None`` a sensible one
is constructed.
:param VoucherStore store: The store to use.
:param IRedeemer redeemer: The voucher redeemer to use. If ``None`` a
sensible one is constructed.
......@@ -67,8 +63,6 @@ def from_configuration(node_config, store=None, redeemer=None):
:return IResource: The root of the resource hierarchy presented by the
client side of the plugin.
"""
if store is None:
store = VoucherStore.from_node_config(node_config)
if redeemer is None:
redeemer = NonRedeemer()
controller = PaymentController(store, redeemer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment