From 4187f8a1c0182297179c88180be3aa08da18ad1f Mon Sep 17 00:00:00 2001
From: Flugschwein <flugschwein@gmx.at>
Date: Thu, 9 Apr 2020 23:46:01 +0200
Subject: [PATCH] Add new hardfork_hive operation, which got added at the
 steem/hive hardfork.

---
 beem/snapshot.py         | 6 ++++++
 beembase/operationids.py | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/beem/snapshot.py b/beem/snapshot.py
index 269a29b7..f3b66fad 100644
--- a/beem/snapshot.py
+++ b/beem/snapshot.py
@@ -439,6 +439,12 @@ class AccountSnapshot(list):
                 self.update_in_vote(ts, weight, op)
             return
 
+        elif op['type'] == 'hardfork_hive':
+            vests = Amount(op['vests_converted'])
+            hbd = Amount(op['steem_transferred'])
+            hive = Amount(op['sbd_transferred'])
+            self.update(ts, vests * (-1), 0, 0, hive * (-1), hbd * (-1))
+
         elif op['type'] in ['comment', 'feed_publish', 'shutdown_witness',
                             'account_witness_vote', 'witness_update', 'custom_json',
                             'limit_order_create', 'account_update',
diff --git a/beembase/operationids.py b/beembase/operationids.py
index b3700bde..3b9ba3d1 100644
--- a/beembase/operationids.py
+++ b/beembase/operationids.py
@@ -71,7 +71,8 @@ ops = [
     'producer_reward',
     'clear_null_account_balance',
     'proposal_pay',
-    'sps_fund'
+    'sps_fund',
+    'hardfork_hive'
 ]
 operations = {o: ops.index(o) for o in ops}
 
-- 
GitLab