summaryrefslogtreecommitdiff
path: root/src/service.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-01-20 20:51:10 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-01-20 20:51:10 +0100
commit05ecd0105d4e723517bc269c9b42bc650743ee89 (patch)
tree4ef3a1455ab471fca8b261ed7a522c33ca5f0e20 /src/service.cpp
parentb60e7b5e07033b926c29042ba6b267d5af32f7e3 (diff)
Changing local state via service context
Diffstat (limited to 'src/service.cpp')
-rw-r--r--src/service.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/service.cpp b/src/service.cpp
index f8217c8..c731990 100644
--- a/src/service.cpp
+++ b/src/service.cpp
@@ -23,3 +23,13 @@ const Peer & Service::Context::peer() const
{
return p->peer;
}
+
+const Stored<LocalState> & Service::Context::local() const
+{
+ return p->local;
+}
+
+void Service::Context::local(const LocalState & ls)
+{
+ p->local = p->local.ref().storage().store(ls);
+}