• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

libbitcoin / libbitcoin-system / 23096907349

14 Mar 2026 09:39PM UTC coverage: 81.295% (-0.02%) from 81.31%
23096907349

Pull #1794

github

web-flow
Merge d42b2b41f into 7440479d4
Pull Request #1794: Refactor json serializers into their own files.

120 of 165 new or added lines in 11 files covered. (72.73%)

2 existing lines in 1 file now uncovered.

11000 of 13531 relevant lines covered (81.29%)

3502537.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/chain/json/operation.cpp
1

2
/**
3
 * Copyright (c) 2011-2026 libbitcoin developers (see AUTHORS)
4
 *
5
 * This file is part of libbitcoin.
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
#include <bitcoin/system/chain/json/json.hpp>
21

22
#include <bitcoin/system/chain/enums/flags.hpp>
23
#include <bitcoin/system/chain/operation.hpp>
24
#include <bitcoin/system/define.hpp>
25

26
namespace libbitcoin {
27
namespace system {
28
namespace chain {
29

30
DEFINE_JSON_TO_TAG(operation)
1✔
31
{
32
    return operation{ std::string_view{ value.as_string() } };
1✔
33
}
34

35
DEFINE_JSON_FROM_TAG(operation)
2✔
36
{
37
    value = instance.to_string(flags::all_rules);
2✔
38
}
2✔
39

NEW
40
DEFINE_JSON_TO_TAG(operation::cptr)
×
41
{
NEW
42
    return to_shared(tag_invoke(to_tag<operation>{}, value));
×
43
}
44

NEW
45
DEFINE_JSON_FROM_TAG(operation::cptr)
×
46
{
NEW
47
    tag_invoke(from_tag{}, value, *instance);
×
NEW
48
}
×
49
} // namespace chain
50
} // namespace system
51
} // namespace libbitcoin
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc