Page MenuHomePhabricator

[refactor] use compile time string_view for DBKeys
AbandonedPublic

Authored by majcosta on Dec 9 2020, 13:02.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

Recently D8596 had to redeclare DBKeys in the header file since it is also used in salvage.cpp

As previously discussed in D7020, this moves the constants into walletdb.h using string_views to make them eval at compile time

Test Plan
ninja all check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Branch
use_string_view_in_walletdb
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14354
Build 28683: Build Difflint-circular-dependencies · build-without-wallet · build-diff · build-clang · build-clang-tidy · build-debug
Build 28682: arc lint + arc unit

Event Timeline

majcosta requested review of this revision.Dec 9 2020, 13:02
deadalnix requested changes to this revision.Dec 9 2020, 13:24
deadalnix added a subscriber: deadalnix.

If you are going to do that, you need to add test for the serialization routines. I don't see what making these constexpr really benefit anything. The optimizer is likely able to do it anyways.

This revision now requires changes to proceed.Dec 9 2020, 13:24

yea this ain't worth it