@neuraiproject/neurai-rpc 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +128 -0
- package/DEPIN_EXAMPLES.md +271 -0
- package/DEPIN_IMPLEMENTATION_GUIDE_EN.md +927 -0
- package/README.md +49 -4
- package/depin.ts +294 -0
- package/dist/index.cjs +157 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +156 -8
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +61 -1
- package/dist/types.d.ts.map +1 -1
- package/docs.json +5 -5
- package/docs.ts +1118 -1118
- package/index.ts +9 -0
- package/neurai_methods.md +7 -7
- package/package.json +1 -1
- package/test-depin.ts +187 -0
- package/tsconfig.json +26 -0
- package/Neurai/.gitattributes +0 -1
- package/Neurai/.github/ISSUE_TEMPLATE.md +0 -37
- package/Neurai/.github/scripts/00-install-deps.sh +0 -133
- package/Neurai/.github/scripts/02-copy-build-dependencies.sh +0 -36
- package/Neurai/.github/scripts/03-export-path.sh +0 -26
- package/Neurai/.github/scripts/04-configure-build.sh +0 -39
- package/Neurai/.github/scripts/05-binary-checks.sh +0 -41
- package/Neurai/.github/scripts/06-package.sh +0 -256
- package/Neurai/.github/workflows/build-neurai.yml +0 -112
- package/Neurai/.pydevproject +0 -5
- package/Neurai/.travis.yml +0 -80
- package/Neurai/.tx/config +0 -10
- package/Neurai/CONTRIBUTING.md +0 -286
- package/Neurai/COPYING +0 -22
- package/Neurai/INSTALL.md +0 -5
- package/Neurai/Makefile.am +0 -313
- package/Neurai/README.md +0 -110
- package/Neurai/about +0 -35
- package/Neurai/assets/asset_metadata_spec.md +0 -99
- package/Neurai/assets/tools/README.md +0 -53
- package/Neurai/assets/tools/asset_audit.py +0 -179
- package/Neurai/assets/tools/blockfacts.py +0 -45
- package/Neurai/assets/tools/ipfs_pinner.py +0 -448
- package/Neurai/assets/tools/issuebulk.py +0 -162
- package/Neurai/assets/tools/signed_promises.py +0 -197
- package/Neurai/assets/tools/txfacts.py +0 -120
- package/Neurai/autogen.sh +0 -17
- package/Neurai/build-aux/m4/ax_boost_base.m4 +0 -291
- package/Neurai/build-aux/m4/ax_boost_chrono.m4 +0 -119
- package/Neurai/build-aux/m4/ax_boost_filesystem.m4 +0 -119
- package/Neurai/build-aux/m4/ax_boost_program_options.m4 +0 -108
- package/Neurai/build-aux/m4/ax_boost_system.m4 +0 -122
- package/Neurai/build-aux/m4/ax_boost_thread.m4 +0 -150
- package/Neurai/build-aux/m4/ax_boost_unit_test_framework.m4 +0 -138
- package/Neurai/build-aux/m4/ax_check_compile_flag.m4 +0 -74
- package/Neurai/build-aux/m4/ax_check_link_flag.m4 +0 -74
- package/Neurai/build-aux/m4/ax_check_preproc_flag.m4 +0 -74
- package/Neurai/build-aux/m4/ax_cxx_compile_stdcxx.m4 +0 -951
- package/Neurai/build-aux/m4/ax_gcc_func_attribute.m4 +0 -223
- package/Neurai/build-aux/m4/ax_pthread.m4 +0 -485
- package/Neurai/build-aux/m4/l_atomic.m4 +0 -46
- package/Neurai/build-aux/m4/neurai_find_bdb48.m4 +0 -80
- package/Neurai/build-aux/m4/neurai_qt.m4 +0 -387
- package/Neurai/build-aux/m4/neurai_subdir_to_include.m4 +0 -20
- package/Neurai/configure.ac +0 -1359
- package/Neurai/contrib/Dockerfile +0 -60
- package/Neurai/contrib/README.md +0 -50
- package/Neurai/contrib/debian/README.md +0 -21
- package/Neurai/contrib/debian/changelog +0 -578
- package/Neurai/contrib/debian/compat +0 -1
- package/Neurai/contrib/debian/control +0 -70
- package/Neurai/contrib/debian/copyright +0 -137
- package/Neurai/contrib/debian/examples/neurai.conf +0 -147
- package/Neurai/contrib/debian/gbp.conf +0 -5
- package/Neurai/contrib/debian/neurai-qt.desktop +0 -13
- package/Neurai/contrib/debian/neurai-qt.install +0 -6
- package/Neurai/contrib/debian/neurai-qt.lintian-overrides +0 -2
- package/Neurai/contrib/debian/neurai-qt.manpages +0 -1
- package/Neurai/contrib/debian/neurai-qt.protocol +0 -11
- package/Neurai/contrib/debian/neurai-tx.bash-completion +0 -1
- package/Neurai/contrib/debian/neurai-tx.install +0 -1
- package/Neurai/contrib/debian/neurai-tx.manpages +0 -1
- package/Neurai/contrib/debian/neuraid.bash-completion +0 -2
- package/Neurai/contrib/debian/neuraid.examples +0 -1
- package/Neurai/contrib/debian/neuraid.install +0 -2
- package/Neurai/contrib/debian/neuraid.lintian-overrides +0 -2
- package/Neurai/contrib/debian/neuraid.manpages +0 -2
- package/Neurai/contrib/debian/patches/README +0 -3
- package/Neurai/contrib/debian/patches/series +0 -1
- package/Neurai/contrib/debian/rules +0 -23
- package/Neurai/contrib/debian/source/format +0 -1
- package/Neurai/contrib/debian/watch +0 -5
- package/Neurai/contrib/devtools/README.md +0 -188
- package/Neurai/contrib/devtools/check-doc.py +0 -47
- package/Neurai/contrib/devtools/check-rpc-mappings.py +0 -159
- package/Neurai/contrib/devtools/clang-format-diff.py +0 -164
- package/Neurai/contrib/devtools/commit-script-check.sh +0 -48
- package/Neurai/contrib/devtools/copyright_header.py +0 -617
- package/Neurai/contrib/devtools/gen-manpages.sh +0 -29
- package/Neurai/contrib/devtools/git-subtree-check.sh +0 -79
- package/Neurai/contrib/devtools/github-merge.py +0 -330
- package/Neurai/contrib/devtools/lint-all.sh +0 -24
- package/Neurai/contrib/devtools/lint-whitespace.sh +0 -90
- package/Neurai/contrib/devtools/optimize-pngs.py +0 -79
- package/Neurai/contrib/devtools/security-check.py +0 -217
- package/Neurai/contrib/devtools/split-debug.sh.in +0 -10
- package/Neurai/contrib/devtools/symbol-check.py +0 -162
- package/Neurai/contrib/devtools/test-security-check.py +0 -63
- package/Neurai/contrib/devtools/update-translations.py +0 -208
- package/Neurai/contrib/filter-lcov.py +0 -25
- package/Neurai/contrib/init/README.md +0 -12
- package/Neurai/contrib/init/neuraid.conf +0 -65
- package/Neurai/contrib/init/neuraid.init +0 -67
- package/Neurai/contrib/init/neuraid.openrc +0 -92
- package/Neurai/contrib/init/neuraid.openrcconf +0 -33
- package/Neurai/contrib/init/neuraid.service +0 -22
- package/Neurai/contrib/init/org.neurai.neuraid.plist +0 -14
- package/Neurai/contrib/install_cli.sh +0 -13
- package/Neurai/contrib/install_db4.sh +0 -251
- package/Neurai/contrib/linearize/README.md +0 -55
- package/Neurai/contrib/linearize/example-linearize.cfg +0 -50
- package/Neurai/contrib/linearize/linearize-data.py +0 -310
- package/Neurai/contrib/linearize/linearize-hashes.py +0 -158
- package/Neurai/contrib/macdeploy/LICENSE +0 -674
- package/Neurai/contrib/macdeploy/README.md +0 -15
- package/Neurai/contrib/macdeploy/background.svg +0 -35
- package/Neurai/contrib/macdeploy/custom_dsstore.py +0 -61
- package/Neurai/contrib/macdeploy/detached-sig-apply.sh +0 -58
- package/Neurai/contrib/macdeploy/detached-sig-create.sh +0 -53
- package/Neurai/contrib/macdeploy/extract-osx-sdk.sh +0 -35
- package/Neurai/contrib/macdeploy/fancy.plist +0 -32
- package/Neurai/contrib/macdeploy/macdeployqtplus +0 -872
- package/Neurai/contrib/neurai-cli.bash-completion +0 -156
- package/Neurai/contrib/neurai-tx.bash-completion +0 -59
- package/Neurai/contrib/neuraid.bash-completion +0 -58
- package/Neurai/contrib/qos/README.md +0 -5
- package/Neurai/contrib/qos/tc.sh +0 -61
- package/Neurai/contrib/rpm/README.md +0 -185
- package/Neurai/contrib/rpm/neurai.fc +0 -8
- package/Neurai/contrib/rpm/neurai.if +0 -157
- package/Neurai/contrib/rpm/neurai.spec +0 -442
- package/Neurai/contrib/rpm/neurai.te +0 -81
- package/Neurai/contrib/seeds/README.md +0 -19
- package/Neurai/contrib/seeds/generate-seeds.py +0 -138
- package/Neurai/contrib/seeds/makeseeds.py +0 -173
- package/Neurai/contrib/seeds/nodes_main.txt +0 -1
- package/Neurai/contrib/seeds/nodes_test.txt +0 -6
- package/Neurai/contrib/static-builds/README.md +0 -219
- package/Neurai/contrib/static-builds/script.sh +0 -323
- package/Neurai/contrib/static-builds/staticbuild.md +0 -483
- package/Neurai/contrib/testgen/README.md +0 -8
- package/Neurai/contrib/testgen/base58.py +0 -107
- package/Neurai/contrib/testgen/gen_base58_test_vectors.py +0 -129
- package/Neurai/contrib/tidy_datadir.sh +0 -64
- package/Neurai/contrib/verifybinaries/README.md +0 -3
- package/Neurai/contrib/verifybinaries/verify.sh +0 -3
- package/Neurai/contrib/windeploy/detached-sig-create.sh +0 -36
- package/Neurai/contrib/windeploy/win-codesign.cert +0 -99
- package/Neurai/contrib/zmq/zmq_sub.py +0 -90
- package/Neurai/contrib/zmq/zmq_sub3.4.py +0 -90
- package/Neurai/contrib/zmq/zmq_test.py +0 -75
- package/Neurai/depends/README.md +0 -84
- package/Neurai/depends/builders/darwin.mk +0 -22
- package/Neurai/depends/builders/default.mk +0 -20
- package/Neurai/depends/builders/linux.mk +0 -2
- package/Neurai/depends/config.guess +0 -1466
- package/Neurai/depends/config.site.in +0 -119
- package/Neurai/depends/config.sub +0 -1836
- package/Neurai/depends/description.md +0 -53
- package/Neurai/depends/funcs.mk +0 -262
- package/Neurai/depends/hosts/darwin.mk +0 -126
- package/Neurai/depends/hosts/default.mk +0 -39
- package/Neurai/depends/hosts/linux.mk +0 -32
- package/Neurai/depends/hosts/mingw32.mk +0 -12
- package/Neurai/depends/packages/bdb.mk +0 -31
- package/Neurai/depends/packages/boost.mk +0 -45
- package/Neurai/depends/packages/dbus.mk +0 -23
- package/Neurai/depends/packages/expat.mk +0 -21
- package/Neurai/depends/packages/fontconfig.mk +0 -28
- package/Neurai/depends/packages/freetype.mk +0 -22
- package/Neurai/depends/packages/libICE.mk +0 -23
- package/Neurai/depends/packages/libSM.mk +0 -23
- package/Neurai/depends/packages/libX11.mk +0 -23
- package/Neurai/depends/packages/libXau.mk +0 -23
- package/Neurai/depends/packages/libXext.mk +0 -22
- package/Neurai/depends/packages/libevent.mk +0 -33
- package/Neurai/depends/packages/libxcb.mk +0 -35
- package/Neurai/depends/packages/libxkbcommon.mk +0 -32
- package/Neurai/depends/packages/miniupnpc.mk +0 -28
- package/Neurai/depends/packages/native_b2.mk +0 -20
- package/Neurai/depends/packages/native_biplist.mk +0 -20
- package/Neurai/depends/packages/native_capnp.mk +0 -18
- package/Neurai/depends/packages/native_ccache.mk +0 -25
- package/Neurai/depends/packages/native_cctools.mk +0 -38
- package/Neurai/depends/packages/native_cdrkit.mk +0 -26
- package/Neurai/depends/packages/native_clang.mk +0 -27
- package/Neurai/depends/packages/native_ds_store.mk +0 -15
- package/Neurai/depends/packages/native_libdmg-hfsplus.mk +0 -24
- package/Neurai/depends/packages/native_libtapi.mk +0 -20
- package/Neurai/depends/packages/native_mac_alias.mk +0 -18
- package/Neurai/depends/packages/native_protobuf.mk +0 -25
- package/Neurai/depends/packages/openssl.mk +0 -80
- package/Neurai/depends/packages/packages.mk +0 -23
- package/Neurai/depends/packages/protobuf.mk +0 -29
- package/Neurai/depends/packages/qrencode.mk +0 -22
- package/Neurai/depends/packages/qt.mk +0 -285
- package/Neurai/depends/packages/xcb_proto.mk +0 -27
- package/Neurai/depends/packages/xextproto.mk +0 -21
- package/Neurai/depends/packages/xproto.mk +0 -21
- package/Neurai/depends/packages/xtrans.mk +0 -22
- package/Neurai/depends/packages/zeromq.mk +0 -37
- package/Neurai/depends/packages/zlib.mk +0 -27
- package/Neurai/depends/packages.md +0 -194
- package/Neurai/depends/patches/qt/mac-qmake.conf +0 -26
- package/Neurai/doc/Doxyfile.in +0 -2460
- package/Neurai/doc/JSON-RPC-interface.md +0 -129
- package/Neurai/doc/README.md +0 -594
- package/Neurai/doc/README_osx.md +0 -97
- package/Neurai/doc/README_windows.txt +0 -23
- package/Neurai/doc/REST-interface.md +0 -112
- package/Neurai/doc/adr/0001-record-architecture-decisions.md +0 -19
- package/Neurai/doc/assets-attribution.md +0 -1
- package/Neurai/doc/atomicswaps.md +0 -125
- package/Neurai/doc/benchmarking.md +0 -30
- package/Neurai/doc/bips.md +0 -35
- package/Neurai/doc/bitcoin_logo_doxygen.png +0 -0
- package/Neurai/doc/build-docker.md +0 -110
- package/Neurai/doc/build-freebsd.md +0 -85
- package/Neurai/doc/build-openbsd.md +0 -190
- package/Neurai/doc/build-osx.md +0 -136
- package/Neurai/doc/build-rasberrypi.md +0 -44
- package/Neurai/doc/build-ubuntu.md +0 -287
- package/Neurai/doc/build-unix.md +0 -248
- package/Neurai/doc/build-windows.md +0 -119
- package/Neurai/doc/dependencies.md +0 -43
- package/Neurai/doc/developer-notes.md +0 -708
- package/Neurai/doc/dnsseed-policy.md +0 -54
- package/Neurai/doc/docker/Dockerfile-Linux64-bin +0 -41
- package/Neurai/doc/docker/Dockerfile-Node-Linux +0 -53
- package/Neurai/doc/docker/Dockerfile-Win64-bin +0 -41
- package/Neurai/doc/docker/README.md +0 -5
- package/Neurai/doc/files.md +0 -18
- package/Neurai/doc/fuzzing.md +0 -72
- package/Neurai/doc/init.md +0 -141
- package/Neurai/doc/man/Makefile.am +0 -17
- package/Neurai/doc/man/neurai-cli.1 +0 -104
- package/Neurai/doc/man/neurai-qt.1 +0 -558
- package/Neurai/doc/man/neurai-tx.1 +0 -128
- package/Neurai/doc/man/neuraid.1 +0 -537
- package/Neurai/doc/neurai-conf.md +0 -61
- package/Neurai/doc/neurai_logo_doxygen.png +0 -0
- package/Neurai/doc/reduce-memory.md +0 -50
- package/Neurai/doc/reduce-traffic.md +0 -54
- package/Neurai/doc/release-notes/release-notes-0.15.0.1.md +0 -87
- package/Neurai/doc/release-notes/release-notes-0.15.0.md +0 -878
- package/Neurai/doc/release-notes/release-notes-1.0.0.md +0 -80
- package/Neurai/doc/release-notes/release-notes-1.0.2.md +0 -80
- package/Neurai/doc/release-notes/release-notes-2.0.4.md +0 -87
- package/Neurai/doc/release-notes/release-notes-2.1.0.md +0 -94
- package/Neurai/doc/release-notes/release-notes-2.2.2.md +0 -98
- package/Neurai/doc/release-notes/release-notes-2.4.0.md +0 -80
- package/Neurai/doc/release-notes.md +0 -95
- package/Neurai/doc/release-process.md +0 -113
- package/Neurai/doc/release_checklist.md +0 -30
- package/Neurai/doc/shared-libraries.md +0 -49
- package/Neurai/doc/tor.md +0 -125
- package/Neurai/doc/translation_process.md +0 -109
- package/Neurai/doc/translation_strings_policy.md +0 -109
- package/Neurai/doc/zmq.md +0 -114
- package/Neurai/img/neurai-title.jpg +0 -0
- package/Neurai/libneuraiconsensus.pc.in +0 -11
- package/Neurai/scripts/00-install-deps.sh +0 -130
- package/Neurai/scripts/02-copy-build-dependencies.sh +0 -68
- package/Neurai/scripts/03-export-path.sh +0 -26
- package/Neurai/scripts/04-configure-build.sh +0 -39
- package/Neurai/scripts/05-binary-checks.sh +0 -41
- package/Neurai/scripts/06-package.sh +0 -256
- package/Neurai/share/genbuild.sh +0 -54
- package/Neurai/share/pixmaps/neurai.BMP +0 -0
- package/Neurai/share/pixmaps/neurai.ico +0 -0
- package/Neurai/share/pixmaps/neurai.svg +0 -107
- package/Neurai/share/pixmaps/neurai128.png +0 -0
- package/Neurai/share/pixmaps/neurai128.xpm +0 -818
- package/Neurai/share/pixmaps/neurai16.png +0 -0
- package/Neurai/share/pixmaps/neurai16.xpm +0 -100
- package/Neurai/share/pixmaps/neurai256.png +0 -0
- package/Neurai/share/pixmaps/neurai256.xpm +0 -1584
- package/Neurai/share/pixmaps/neurai32.png +0 -0
- package/Neurai/share/pixmaps/neurai32.xpm +0 -200
- package/Neurai/share/pixmaps/neurai64.png +0 -0
- package/Neurai/share/pixmaps/neurai64.xpm +0 -301
- package/Neurai/share/pixmaps/nsis-header.bmp +0 -0
- package/Neurai/share/pixmaps/nsis-wizard.bmp +0 -0
- package/Neurai/share/qt/Info.plist.in +0 -109
- package/Neurai/share/qt/extract_strings_qt.py +0 -90
- package/Neurai/share/rpcuser/README.md +0 -10
- package/Neurai/share/rpcuser/rpcuser.py +0 -42
- package/Neurai/share/setup.nsi.in +0 -177
- package/Neurai/src/.clang-format +0 -51
- package/Neurai/src/LibBoolEE.cpp +0 -177
- package/Neurai/src/LibBoolEE.h +0 -70
- package/Neurai/src/Makefile.am +0 -651
- package/Neurai/src/Makefile.bench.include +0 -83
- package/Neurai/src/Makefile.leveldb.include +0 -151
- package/Neurai/src/Makefile.qt.include +0 -579
- package/Neurai/src/Makefile.qttest.include +0 -79
- package/Neurai/src/Makefile.test.include +0 -198
- package/Neurai/src/addrdb.cpp +0 -148
- package/Neurai/src/addrdb.h +0 -104
- package/Neurai/src/addressindex.h +0 -409
- package/Neurai/src/addrman.cpp +0 -532
- package/Neurai/src/addrman.h +0 -607
- package/Neurai/src/algo/Lyra2RE.c +0 -110
- package/Neurai/src/algo/Lyra2RE.h +0 -15
- package/Neurai/src/algo/aes_helper.c +0 -392
- package/Neurai/src/algo/blake.c +0 -1120
- package/Neurai/src/algo/bmw.c +0 -965
- package/Neurai/src/algo/cubehash.c +0 -723
- package/Neurai/src/algo/echo.c +0 -1031
- package/Neurai/src/algo/extra.c +0 -35
- package/Neurai/src/algo/extra.h +0 -4
- package/Neurai/src/algo/fugue.c +0 -1208
- package/Neurai/src/algo/gost_streebog.c +0 -1023
- package/Neurai/src/algo/gost_streebog.h +0 -185
- package/Neurai/src/algo/groestl.c +0 -3119
- package/Neurai/src/algo/hamsi.c +0 -867
- package/Neurai/src/algo/hamsi_helper.c +0 -39648
- package/Neurai/src/algo/haval.c +0 -983
- package/Neurai/src/algo/haval_helper.c +0 -190
- package/Neurai/src/algo/jh.c +0 -1116
- package/Neurai/src/algo/keccak.c +0 -1824
- package/Neurai/src/algo/luffa.c +0 -1436
- package/Neurai/src/algo/lyra2.cpp +0 -382
- package/Neurai/src/algo/lyra2.h +0 -44
- package/Neurai/src/algo/md_helper.c +0 -347
- package/Neurai/src/algo/sha2.c +0 -550
- package/Neurai/src/algo/shabal.c +0 -806
- package/Neurai/src/algo/shavite.c +0 -1764
- package/Neurai/src/algo/simd.c +0 -1799
- package/Neurai/src/algo/skein.c +0 -1254
- package/Neurai/src/algo/sph_blake.h +0 -327
- package/Neurai/src/algo/sph_bmw.h +0 -328
- package/Neurai/src/algo/sph_cubehash.h +0 -292
- package/Neurai/src/algo/sph_echo.h +0 -320
- package/Neurai/src/algo/sph_fugue.h +0 -81
- package/Neurai/src/algo/sph_groestl.h +0 -329
- package/Neurai/src/algo/sph_hamsi.h +0 -321
- package/Neurai/src/algo/sph_haval.h +0 -976
- package/Neurai/src/algo/sph_jh.h +0 -298
- package/Neurai/src/algo/sph_keccak.h +0 -293
- package/Neurai/src/algo/sph_luffa.h +0 -296
- package/Neurai/src/algo/sph_md_helper.c +0 -352
- package/Neurai/src/algo/sph_sha2.c +0 -690
- package/Neurai/src/algo/sph_sha2.h +0 -379
- package/Neurai/src/algo/sph_sha2big.c +0 -255
- package/Neurai/src/algo/sph_shabal.h +0 -344
- package/Neurai/src/algo/sph_shavite.h +0 -314
- package/Neurai/src/algo/sph_simd.h +0 -309
- package/Neurai/src/algo/sph_skein.h +0 -298
- package/Neurai/src/algo/sph_tiger.h +0 -191
- package/Neurai/src/algo/sph_types.h +0 -1976
- package/Neurai/src/algo/sph_whirlpool.h +0 -218
- package/Neurai/src/algo/sponge.cpp +0 -745
- package/Neurai/src/algo/sponge.h +0 -108
- package/Neurai/src/algo/tiger.cpp +0 -697
- package/Neurai/src/algo/whirlpool.c +0 -3480
- package/Neurai/src/amount.h +0 -31
- package/Neurai/src/arith_uint256.cpp +0 -264
- package/Neurai/src/arith_uint256.h +0 -298
- package/Neurai/src/assets/assetdb.cpp +0 -395
- package/Neurai/src/assets/assetdb.h +0 -99
- package/Neurai/src/assets/assets.cpp +0 -5938
- package/Neurai/src/assets/assets.h +0 -620
- package/Neurai/src/assets/assetsnapshotdb.cpp +0 -151
- package/Neurai/src/assets/assetsnapshotdb.h +0 -78
- package/Neurai/src/assets/assettypes.cpp +0 -31
- package/Neurai/src/assets/assettypes.h +0 -689
- package/Neurai/src/assets/messages.cpp +0 -346
- package/Neurai/src/assets/messages.h +0 -143
- package/Neurai/src/assets/myassetsdb.cpp +0 -344
- package/Neurai/src/assets/myassetsdb.h +0 -82
- package/Neurai/src/assets/restricteddb.cpp +0 -257
- package/Neurai/src/assets/restricteddb.h +0 -64
- package/Neurai/src/assets/rewards.cpp +0 -395
- package/Neurai/src/assets/rewards.h +0 -171
- package/Neurai/src/assets/snapshotrequestdb.cpp +0 -236
- package/Neurai/src/assets/snapshotrequestdb.h +0 -117
- package/Neurai/src/base58.cpp +0 -347
- package/Neurai/src/base58.h +0 -174
- package/Neurai/src/bench/Examples.cpp +0 -36
- package/Neurai/src/bench/base58.cpp +0 -61
- package/Neurai/src/bench/bench.cpp +0 -106
- package/Neurai/src/bench/bench.h +0 -82
- package/Neurai/src/bench/bench_neurai.cpp +0 -29
- package/Neurai/src/bench/ccoins_caching.cpp +0 -88
- package/Neurai/src/bench/checkblock.cpp +0 -59
- package/Neurai/src/bench/checkqueue.cpp +0 -105
- package/Neurai/src/bench/coin_selection.cpp +0 -60
- package/Neurai/src/bench/crypto_hash.cpp +0 -105
- package/Neurai/src/bench/data/block566553.raw +0 -0
- package/Neurai/src/bench/lockedpool.cpp +0 -49
- package/Neurai/src/bench/mempool_eviction.cpp +0 -116
- package/Neurai/src/bench/perf.cpp +0 -55
- package/Neurai/src/bench/perf.h +0 -39
- package/Neurai/src/bench/prevector_destructor.cpp +0 -38
- package/Neurai/src/bench/rollingbloom.cpp +0 -45
- package/Neurai/src/bench/verify_script.cpp +0 -110
- package/Neurai/src/blockencodings.cpp +0 -231
- package/Neurai/src/blockencodings.h +0 -239
- package/Neurai/src/bloom.cpp +0 -313
- package/Neurai/src/bloom.h +0 -145
- package/Neurai/src/chain.cpp +0 -171
- package/Neurai/src/chain.h +0 -524
- package/Neurai/src/chainparams.cpp +0 -635
- package/Neurai/src/chainparams.h +0 -241
- package/Neurai/src/chainparamsbase.cpp +0 -104
- package/Neurai/src/chainparamsbase.h +0 -65
- package/Neurai/src/chainparamsseeds.h +0 -15
- package/Neurai/src/checkpoints.cpp +0 -34
- package/Neurai/src/checkpoints.h +0 -29
- package/Neurai/src/checkqueue.h +0 -219
- package/Neurai/src/clientversion.cpp +0 -104
- package/Neurai/src/clientversion.h +0 -55
- package/Neurai/src/coins.cpp +0 -539
- package/Neurai/src/coins.h +0 -322
- package/Neurai/src/compat/byteswap.h +0 -68
- package/Neurai/src/compat/endian.h +0 -198
- package/Neurai/src/compat/glibc_compat.cpp +0 -76
- package/Neurai/src/compat/glibc_sanity.cpp +0 -70
- package/Neurai/src/compat/glibcxx_sanity.cpp +0 -63
- package/Neurai/src/compat/sanity.h +0 -13
- package/Neurai/src/compat/strnlen.cpp +0 -20
- package/Neurai/src/compat.h +0 -105
- package/Neurai/src/compressor.cpp +0 -187
- package/Neurai/src/compressor.h +0 -123
- package/Neurai/src/config/.empty +0 -0
- package/Neurai/src/consensus/consensus.cpp +0 -29
- package/Neurai/src/consensus/consensus.h +0 -55
- package/Neurai/src/consensus/merkle.cpp +0 -189
- package/Neurai/src/consensus/merkle.h +0 -40
- package/Neurai/src/consensus/params.h +0 -84
- package/Neurai/src/consensus/tx_verify.cpp +0 -900
- package/Neurai/src/consensus/tx_verify.h +0 -93
- package/Neurai/src/consensus/validation.h +0 -121
- package/Neurai/src/core_io.h +0 -40
- package/Neurai/src/core_memusage.h +0 -73
- package/Neurai/src/core_read.cpp +0 -191
- package/Neurai/src/core_write.cpp +0 -331
- package/Neurai/src/crypto/aes.cpp +0 -218
- package/Neurai/src/crypto/aes.h +0 -120
- package/Neurai/src/crypto/aes_helper.c +0 -392
- package/Neurai/src/crypto/blake.c +0 -1120
- package/Neurai/src/crypto/bmw.c +0 -965
- package/Neurai/src/crypto/chacha20.cpp +0 -182
- package/Neurai/src/crypto/chacha20.h +0 -28
- package/Neurai/src/crypto/common.h +0 -105
- package/Neurai/src/crypto/ctaes/COPYING +0 -21
- package/Neurai/src/crypto/ctaes/README.md +0 -41
- package/Neurai/src/crypto/ctaes/bench.c +0 -170
- package/Neurai/src/crypto/ctaes/ctaes.c +0 -556
- package/Neurai/src/crypto/ctaes/ctaes.h +0 -41
- package/Neurai/src/crypto/ctaes/test.c +0 -110
- package/Neurai/src/crypto/cubehash.c +0 -723
- package/Neurai/src/crypto/echo.c +0 -1031
- package/Neurai/src/crypto/ethash/helpers.hpp +0 -54
- package/Neurai/src/crypto/ethash/include/ethash/ethash.h +0 -131
- package/Neurai/src/crypto/ethash/include/ethash/ethash.hpp +0 -172
- package/Neurai/src/crypto/ethash/include/ethash/hash_types.h +0 -50
- package/Neurai/src/crypto/ethash/include/ethash/hash_types.hpp +0 -15
- package/Neurai/src/crypto/ethash/include/ethash/keccak.h +0 -49
- package/Neurai/src/crypto/ethash/include/ethash/keccak.hpp +0 -35
- package/Neurai/src/crypto/ethash/include/ethash/progpow.hpp +0 -49
- package/Neurai/src/crypto/ethash/include/ethash/version.h +0 -18
- package/Neurai/src/crypto/ethash/lib/ethash/bit_manipulation.h +0 -81
- package/Neurai/src/crypto/ethash/lib/ethash/builtins.h +0 -43
- package/Neurai/src/crypto/ethash/lib/ethash/endianness.hpp +0 -106
- package/Neurai/src/crypto/ethash/lib/ethash/ethash-internal.hpp +0 -68
- package/Neurai/src/crypto/ethash/lib/ethash/ethash.cpp +0 -442
- package/Neurai/src/crypto/ethash/lib/ethash/kiss99.hpp +0 -64
- package/Neurai/src/crypto/ethash/lib/ethash/managed.cpp +0 -100
- package/Neurai/src/crypto/ethash/lib/ethash/primes.c +0 -43
- package/Neurai/src/crypto/ethash/lib/ethash/primes.h +0 -25
- package/Neurai/src/crypto/ethash/lib/ethash/progpow.cpp +0 -581
- package/Neurai/src/crypto/ethash/lib/keccak/keccak.c +0 -129
- package/Neurai/src/crypto/ethash/lib/keccak/keccakf1600.c +0 -255
- package/Neurai/src/crypto/ethash/lib/keccak/keccakf800.c +0 -253
- package/Neurai/src/crypto/ethash/lib/support/attributes.h +0 -33
- package/Neurai/src/crypto/ethash/progpow_test_vectors.hpp +0 -64
- package/Neurai/src/crypto/groestl.c +0 -3123
- package/Neurai/src/crypto/hmac_sha256.cpp +0 -36
- package/Neurai/src/crypto/hmac_sha256.h +0 -34
- package/Neurai/src/crypto/hmac_sha512.cpp +0 -36
- package/Neurai/src/crypto/hmac_sha512.h +0 -34
- package/Neurai/src/crypto/jh.c +0 -1116
- package/Neurai/src/crypto/keccak.c +0 -1824
- package/Neurai/src/crypto/luffa.c +0 -1426
- package/Neurai/src/crypto/md_helper.c +0 -346
- package/Neurai/src/crypto/ripemd160.cpp +0 -294
- package/Neurai/src/crypto/ripemd160.h +0 -30
- package/Neurai/src/crypto/sha1.cpp +0 -201
- package/Neurai/src/crypto/sha1.h +0 -30
- package/Neurai/src/crypto/sha2.c +0 -646
- package/Neurai/src/crypto/sha256.cpp +0 -251
- package/Neurai/src/crypto/sha256.h +0 -36
- package/Neurai/src/crypto/sha256_sse4.cpp +0 -1508
- package/Neurai/src/crypto/sha512.cpp +0 -209
- package/Neurai/src/crypto/sha512.h +0 -30
- package/Neurai/src/crypto/shavite.c +0 -1764
- package/Neurai/src/crypto/simd.c +0 -1799
- package/Neurai/src/crypto/skein.c +0 -1254
- package/Neurai/src/crypto/sph_blake.h +0 -327
- package/Neurai/src/crypto/sph_bmw.h +0 -328
- package/Neurai/src/crypto/sph_cubehash.h +0 -292
- package/Neurai/src/crypto/sph_echo.h +0 -320
- package/Neurai/src/crypto/sph_fugue.c +0 -1208
- package/Neurai/src/crypto/sph_fugue.h +0 -81
- package/Neurai/src/crypto/sph_groestl.h +0 -329
- package/Neurai/src/crypto/sph_hamsi.c +0 -867
- package/Neurai/src/crypto/sph_hamsi.h +0 -321
- package/Neurai/src/crypto/sph_hamsi_helper.c +0 -39648
- package/Neurai/src/crypto/sph_jh.h +0 -298
- package/Neurai/src/crypto/sph_keccak.h +0 -293
- package/Neurai/src/crypto/sph_luffa.h +0 -296
- package/Neurai/src/crypto/sph_sha2.c +0 -701
- package/Neurai/src/crypto/sph_sha2.h +0 -378
- package/Neurai/src/crypto/sph_sha512.c +0 -247
- package/Neurai/src/crypto/sph_shabal.c +0 -808
- package/Neurai/src/crypto/sph_shabal.h +0 -343
- package/Neurai/src/crypto/sph_shavite.h +0 -314
- package/Neurai/src/crypto/sph_simd.h +0 -309
- package/Neurai/src/crypto/sph_skein.h +0 -298
- package/Neurai/src/crypto/sph_types.h +0 -1976
- package/Neurai/src/crypto/sph_whirlpool.c +0 -3481
- package/Neurai/src/crypto/sph_whirlpool.h +0 -217
- package/Neurai/src/crypto/whirlpool.c +0 -104
- package/Neurai/src/crypto/whirlpoolx.c +0 -69
- package/Neurai/src/cuckoocache.h +0 -481
- package/Neurai/src/dbwrapper.cpp +0 -246
- package/Neurai/src/dbwrapper.h +0 -345
- package/Neurai/src/depinecies.cpp +0 -406
- package/Neurai/src/depinecies.h +0 -162
- package/Neurai/src/depinmcpclient.cpp +0 -380
- package/Neurai/src/depinmcpclient.h +0 -101
- package/Neurai/src/depinmcpworker.cpp +0 -654
- package/Neurai/src/depinmcpworker.h +0 -205
- package/Neurai/src/depinmsgpool.cpp +0 -908
- package/Neurai/src/depinmsgpool.h +0 -182
- package/Neurai/src/depinmsgpoolnet.cpp +0 -1149
- package/Neurai/src/depinmsgpoolnet.h +0 -148
- package/Neurai/src/fs.cpp +0 -15
- package/Neurai/src/fs.h +0 -29
- package/Neurai/src/hash.cpp +0 -294
- package/Neurai/src/hash.h +0 -613
- package/Neurai/src/httprpc.cpp +0 -262
- package/Neurai/src/httprpc.h +0 -37
- package/Neurai/src/httpserver.cpp +0 -685
- package/Neurai/src/httpserver.h +0 -155
- package/Neurai/src/indirectmap.h +0 -58
- package/Neurai/src/init.cpp +0 -2122
- package/Neurai/src/init.h +0 -85
- package/Neurai/src/key.cpp +0 -317
- package/Neurai/src/key.h +0 -188
- package/Neurai/src/keystore.cpp +0 -146
- package/Neurai/src/keystore.h +0 -120
- package/Neurai/src/leveldb/.travis.yml +0 -13
- package/Neurai/src/leveldb/AUTHORS +0 -12
- package/Neurai/src/leveldb/CONTRIBUTING.md +0 -36
- package/Neurai/src/leveldb/LICENSE +0 -27
- package/Neurai/src/leveldb/Makefile +0 -424
- package/Neurai/src/leveldb/NEWS +0 -17
- package/Neurai/src/leveldb/README.md +0 -174
- package/Neurai/src/leveldb/TODO +0 -14
- package/Neurai/src/leveldb/WINDOWS.md +0 -39
- package/Neurai/src/leveldb/build_detect_platform +0 -259
- package/Neurai/src/leveldb/db/autocompact_test.cc +0 -118
- package/Neurai/src/leveldb/db/builder.cc +0 -88
- package/Neurai/src/leveldb/db/builder.h +0 -34
- package/Neurai/src/leveldb/db/c.cc +0 -595
- package/Neurai/src/leveldb/db/c_test.c +0 -390
- package/Neurai/src/leveldb/db/corruption_test.cc +0 -374
- package/Neurai/src/leveldb/db/db_bench.cc +0 -1020
- package/Neurai/src/leveldb/db/db_impl.cc +0 -1568
- package/Neurai/src/leveldb/db/db_impl.h +0 -211
- package/Neurai/src/leveldb/db/db_iter.cc +0 -317
- package/Neurai/src/leveldb/db/db_iter.h +0 -28
- package/Neurai/src/leveldb/db/db_test.cc +0 -2158
- package/Neurai/src/leveldb/db/dbformat.cc +0 -140
- package/Neurai/src/leveldb/db/dbformat.h +0 -230
- package/Neurai/src/leveldb/db/dbformat_test.cc +0 -112
- package/Neurai/src/leveldb/db/dumpfile.cc +0 -225
- package/Neurai/src/leveldb/db/fault_injection_test.cc +0 -554
- package/Neurai/src/leveldb/db/filename.cc +0 -144
- package/Neurai/src/leveldb/db/filename.h +0 -85
- package/Neurai/src/leveldb/db/filename_test.cc +0 -123
- package/Neurai/src/leveldb/db/leveldbutil.cc +0 -64
- package/Neurai/src/leveldb/db/log_format.h +0 -35
- package/Neurai/src/leveldb/db/log_reader.cc +0 -284
- package/Neurai/src/leveldb/db/log_reader.h +0 -113
- package/Neurai/src/leveldb/db/log_test.cc +0 -591
- package/Neurai/src/leveldb/db/log_writer.cc +0 -112
- package/Neurai/src/leveldb/db/log_writer.h +0 -54
- package/Neurai/src/leveldb/db/memtable.cc +0 -145
- package/Neurai/src/leveldb/db/memtable.h +0 -88
- package/Neurai/src/leveldb/db/recovery_test.cc +0 -324
- package/Neurai/src/leveldb/db/repair.cc +0 -461
- package/Neurai/src/leveldb/db/skiplist.h +0 -384
- package/Neurai/src/leveldb/db/skiplist_test.cc +0 -378
- package/Neurai/src/leveldb/db/snapshot.h +0 -67
- package/Neurai/src/leveldb/db/table_cache.cc +0 -127
- package/Neurai/src/leveldb/db/table_cache.h +0 -61
- package/Neurai/src/leveldb/db/version_edit.cc +0 -266
- package/Neurai/src/leveldb/db/version_edit.h +0 -107
- package/Neurai/src/leveldb/db/version_edit_test.cc +0 -46
- package/Neurai/src/leveldb/db/version_set.cc +0 -1535
- package/Neurai/src/leveldb/db/version_set.h +0 -398
- package/Neurai/src/leveldb/db/version_set_test.cc +0 -179
- package/Neurai/src/leveldb/db/write_batch.cc +0 -147
- package/Neurai/src/leveldb/db/write_batch_internal.h +0 -50
- package/Neurai/src/leveldb/db/write_batch_test.cc +0 -120
- package/Neurai/src/leveldb/doc/bench/db_bench_sqlite3.cc +0 -718
- package/Neurai/src/leveldb/doc/bench/db_bench_tree_db.cc +0 -528
- package/Neurai/src/leveldb/doc/benchmark.html +0 -459
- package/Neurai/src/leveldb/doc/impl.md +0 -170
- package/Neurai/src/leveldb/doc/index.md +0 -523
- package/Neurai/src/leveldb/doc/log_format.md +0 -75
- package/Neurai/src/leveldb/doc/table_format.md +0 -107
- package/Neurai/src/leveldb/helpers/memenv/memenv.cc +0 -398
- package/Neurai/src/leveldb/helpers/memenv/memenv.h +0 -20
- package/Neurai/src/leveldb/helpers/memenv/memenv_test.cc +0 -241
- package/Neurai/src/leveldb/include/leveldb/c.h +0 -290
- package/Neurai/src/leveldb/include/leveldb/cache.h +0 -110
- package/Neurai/src/leveldb/include/leveldb/comparator.h +0 -63
- package/Neurai/src/leveldb/include/leveldb/db.h +0 -163
- package/Neurai/src/leveldb/include/leveldb/dumpfile.h +0 -25
- package/Neurai/src/leveldb/include/leveldb/env.h +0 -351
- package/Neurai/src/leveldb/include/leveldb/filter_policy.h +0 -70
- package/Neurai/src/leveldb/include/leveldb/iterator.h +0 -100
- package/Neurai/src/leveldb/include/leveldb/options.h +0 -213
- package/Neurai/src/leveldb/include/leveldb/slice.h +0 -109
- package/Neurai/src/leveldb/include/leveldb/status.h +0 -112
- package/Neurai/src/leveldb/include/leveldb/table.h +0 -85
- package/Neurai/src/leveldb/include/leveldb/table_builder.h +0 -92
- package/Neurai/src/leveldb/include/leveldb/write_batch.h +0 -64
- package/Neurai/src/leveldb/issues/issue178_test.cc +0 -92
- package/Neurai/src/leveldb/issues/issue200_test.cc +0 -59
- package/Neurai/src/leveldb/port/README +0 -10
- package/Neurai/src/leveldb/port/atomic_pointer.h +0 -245
- package/Neurai/src/leveldb/port/port.h +0 -21
- package/Neurai/src/leveldb/port/port_example.h +0 -145
- package/Neurai/src/leveldb/port/port_posix.cc +0 -68
- package/Neurai/src/leveldb/port/port_posix.h +0 -161
- package/Neurai/src/leveldb/port/port_posix_sse.cc +0 -110
- package/Neurai/src/leveldb/port/port_win.cc +0 -158
- package/Neurai/src/leveldb/port/port_win.h +0 -177
- package/Neurai/src/leveldb/port/thread_annotations.h +0 -60
- package/Neurai/src/leveldb/port/win/stdint.h +0 -24
- package/Neurai/src/leveldb/table/block.cc +0 -268
- package/Neurai/src/leveldb/table/block.h +0 -44
- package/Neurai/src/leveldb/table/block_builder.cc +0 -109
- package/Neurai/src/leveldb/table/block_builder.h +0 -57
- package/Neurai/src/leveldb/table/filter_block.cc +0 -111
- package/Neurai/src/leveldb/table/filter_block.h +0 -68
- package/Neurai/src/leveldb/table/filter_block_test.cc +0 -128
- package/Neurai/src/leveldb/table/format.cc +0 -144
- package/Neurai/src/leveldb/table/format.h +0 -108
- package/Neurai/src/leveldb/table/iterator.cc +0 -67
- package/Neurai/src/leveldb/table/iterator_wrapper.h +0 -66
- package/Neurai/src/leveldb/table/merger.cc +0 -197
- package/Neurai/src/leveldb/table/merger.h +0 -26
- package/Neurai/src/leveldb/table/table.cc +0 -285
- package/Neurai/src/leveldb/table/table_builder.cc +0 -270
- package/Neurai/src/leveldb/table/table_test.cc +0 -876
- package/Neurai/src/leveldb/table/two_level_iterator.cc +0 -182
- package/Neurai/src/leveldb/table/two_level_iterator.h +0 -34
- package/Neurai/src/leveldb/util/arena.cc +0 -68
- package/Neurai/src/leveldb/util/arena.h +0 -68
- package/Neurai/src/leveldb/util/arena_test.cc +0 -68
- package/Neurai/src/leveldb/util/bloom.cc +0 -95
- package/Neurai/src/leveldb/util/bloom_test.cc +0 -162
- package/Neurai/src/leveldb/util/cache.cc +0 -405
- package/Neurai/src/leveldb/util/cache_test.cc +0 -226
- package/Neurai/src/leveldb/util/coding.cc +0 -194
- package/Neurai/src/leveldb/util/coding.h +0 -104
- package/Neurai/src/leveldb/util/coding_test.cc +0 -196
- package/Neurai/src/leveldb/util/comparator.cc +0 -81
- package/Neurai/src/leveldb/util/crc32c.cc +0 -354
- package/Neurai/src/leveldb/util/crc32c.h +0 -45
- package/Neurai/src/leveldb/util/crc32c_test.cc +0 -72
- package/Neurai/src/leveldb/util/env.cc +0 -100
- package/Neurai/src/leveldb/util/env_posix.cc +0 -698
- package/Neurai/src/leveldb/util/env_posix_test.cc +0 -66
- package/Neurai/src/leveldb/util/env_posix_test_helper.h +0 -28
- package/Neurai/src/leveldb/util/env_test.cc +0 -106
- package/Neurai/src/leveldb/util/env_win.cc +0 -898
- package/Neurai/src/leveldb/util/filter_policy.cc +0 -11
- package/Neurai/src/leveldb/util/hash.cc +0 -52
- package/Neurai/src/leveldb/util/hash.h +0 -19
- package/Neurai/src/leveldb/util/hash_test.cc +0 -54
- package/Neurai/src/leveldb/util/histogram.cc +0 -139
- package/Neurai/src/leveldb/util/histogram.h +0 -42
- package/Neurai/src/leveldb/util/logging.cc +0 -72
- package/Neurai/src/leveldb/util/logging.h +0 -43
- package/Neurai/src/leveldb/util/mutexlock.h +0 -41
- package/Neurai/src/leveldb/util/options.cc +0 -30
- package/Neurai/src/leveldb/util/posix_logger.h +0 -98
- package/Neurai/src/leveldb/util/random.h +0 -64
- package/Neurai/src/leveldb/util/status.cc +0 -75
- package/Neurai/src/leveldb/util/testharness.cc +0 -77
- package/Neurai/src/leveldb/util/testharness.h +0 -138
- package/Neurai/src/leveldb/util/testutil.cc +0 -51
- package/Neurai/src/leveldb/util/testutil.h +0 -63
- package/Neurai/src/limitedmap.h +0 -102
- package/Neurai/src/memusage.h +0 -171
- package/Neurai/src/merkleblock.cpp +0 -166
- package/Neurai/src/merkleblock.h +0 -169
- package/Neurai/src/miner.cpp +0 -731
- package/Neurai/src/miner.h +0 -211
- package/Neurai/src/net.cpp +0 -2944
- package/Neurai/src/net.h +0 -888
- package/Neurai/src/net_processing.cpp +0 -3803
- package/Neurai/src/net_processing.h +0 -86
- package/Neurai/src/netaddress.cpp +0 -740
- package/Neurai/src/netaddress.h +0 -179
- package/Neurai/src/netbase.cpp +0 -738
- package/Neurai/src/netbase.h +0 -72
- package/Neurai/src/netmessagemaker.h +0 -38
- package/Neurai/src/neurai-cli-res.rc +0 -35
- package/Neurai/src/neurai-cli.cpp +0 -518
- package/Neurai/src/neurai-tx-res.rc +0 -35
- package/Neurai/src/neurai-tx.cpp +0 -875
- package/Neurai/src/neuraid-res.rc +0 -35
- package/Neurai/src/neuraid.cpp +0 -204
- package/Neurai/src/noui.cpp +0 -60
- package/Neurai/src/noui.h +0 -12
- package/Neurai/src/policy/feerate.cpp +0 -45
- package/Neurai/src/policy/feerate.h +0 -61
- package/Neurai/src/policy/fees.cpp +0 -1074
- package/Neurai/src/policy/fees.h +0 -305
- package/Neurai/src/policy/policy.cpp +0 -274
- package/Neurai/src/policy/policy.h +0 -108
- package/Neurai/src/policy/rbf.cpp +0 -49
- package/Neurai/src/policy/rbf.h +0 -30
- package/Neurai/src/pow.cpp +0 -199
- package/Neurai/src/pow.h +0 -25
- package/Neurai/src/prevector.h +0 -519
- package/Neurai/src/primitives/block.cpp +0 -161
- package/Neurai/src/primitives/block.h +0 -235
- package/Neurai/src/primitives/transaction.cpp +0 -134
- package/Neurai/src/primitives/transaction.h +0 -440
- package/Neurai/src/protocol.cpp +0 -216
- package/Neurai/src/protocol.h +0 -446
- package/Neurai/src/pubkey.cpp +0 -301
- package/Neurai/src/pubkey.h +0 -252
- package/Neurai/src/pubkeyindex.h +0 -76
- package/Neurai/src/qt/addressbookpage.cpp +0 -315
- package/Neurai/src/qt/addressbookpage.h +0 -88
- package/Neurai/src/qt/addresstablemodel.cpp +0 -443
- package/Neurai/src/qt/addresstablemodel.h +0 -97
- package/Neurai/src/qt/askpassphrasedialog.cpp +0 -277
- package/Neurai/src/qt/askpassphrasedialog.h +0 -54
- package/Neurai/src/qt/assetcontroldialog.cpp +0 -827
- package/Neurai/src/qt/assetcontroldialog.h +0 -129
- package/Neurai/src/qt/assetcontroltreewidget.cpp +0 -36
- package/Neurai/src/qt/assetcontroltreewidget.h +0 -24
- package/Neurai/src/qt/assetfilterproxy.cpp +0 -43
- package/Neurai/src/qt/assetfilterproxy.h +0 -30
- package/Neurai/src/qt/assetrecord.h +0 -56
- package/Neurai/src/qt/assetsdialog.cpp +0 -1068
- package/Neurai/src/qt/assetsdialog.h +0 -122
- package/Neurai/src/qt/assettablemodel.cpp +0 -274
- package/Neurai/src/qt/assettablemodel.h +0 -73
- package/Neurai/src/qt/bantablemodel.cpp +0 -184
- package/Neurai/src/qt/bantablemodel.h +0 -75
- package/Neurai/src/qt/callback.h +0 -30
- package/Neurai/src/qt/clientmodel.cpp +0 -342
- package/Neurai/src/qt/clientmodel.h +0 -121
- package/Neurai/src/qt/coincontroldialog.cpp +0 -738
- package/Neurai/src/qt/coincontroldialog.h +0 -114
- package/Neurai/src/qt/coincontroltreewidget.cpp +0 -36
- package/Neurai/src/qt/coincontroltreewidget.h +0 -24
- package/Neurai/src/qt/createassetdialog.cpp +0 -1600
- package/Neurai/src/qt/createassetdialog.h +0 -158
- package/Neurai/src/qt/csvmodelwriter.cpp +0 -93
- package/Neurai/src/qt/csvmodelwriter.h +0 -48
- package/Neurai/src/qt/currencyunits.h +0 -33
- package/Neurai/src/qt/darkstyle.cpp +0 -90
- package/Neurai/src/qt/darkstyle.h +0 -40
- package/Neurai/src/qt/editaddressdialog.cpp +0 -146
- package/Neurai/src/qt/editaddressdialog.h +0 -59
- package/Neurai/src/qt/forms/addressbookpage.ui +0 -159
- package/Neurai/src/qt/forms/askpassphrasedialog.ui +0 -160
- package/Neurai/src/qt/forms/assetcontroldialog.ui +0 -517
- package/Neurai/src/qt/forms/assetsdialog.ui +0 -1305
- package/Neurai/src/qt/forms/coincontroldialog.ui +0 -495
- package/Neurai/src/qt/forms/createassetdialog.ui +0 -1466
- package/Neurai/src/qt/forms/debugwindow.ui +0 -1598
- package/Neurai/src/qt/forms/editaddressdialog.ui +0 -112
- package/Neurai/src/qt/forms/helpmessagedialog.ui +0 -189
- package/Neurai/src/qt/forms/intro.ui +0 -293
- package/Neurai/src/qt/forms/mnemonicdialog1.ui +0 -156
- package/Neurai/src/qt/forms/mnemonicdialog2.ui +0 -353
- package/Neurai/src/qt/forms/mnemonicdialog3.ui +0 -376
- package/Neurai/src/qt/forms/modaloverlay.ui +0 -383
- package/Neurai/src/qt/forms/openuridialog.ui +0 -118
- package/Neurai/src/qt/forms/optionsdialog.ui +0 -923
- package/Neurai/src/qt/forms/overviewpage.ui +0 -845
- package/Neurai/src/qt/forms/receivecoinsdialog.ui +0 -344
- package/Neurai/src/qt/forms/receiverequestdialog.ui +0 -168
- package/Neurai/src/qt/forms/reissueassetdialog.ui +0 -1747
- package/Neurai/src/qt/forms/restrictedassetsdialog.ui +0 -299
- package/Neurai/src/qt/forms/restrictedassignqualifier.ui +0 -165
- package/Neurai/src/qt/forms/restrictedfreezeaddress.ui +0 -232
- package/Neurai/src/qt/forms/sendassetsentry.ui +0 -1344
- package/Neurai/src/qt/forms/sendcoinsdialog.ui +0 -1305
- package/Neurai/src/qt/forms/sendcoinsentry.ui +0 -1269
- package/Neurai/src/qt/forms/signverifymessagedialog.ui +0 -390
- package/Neurai/src/qt/forms/transactiondescdialog.ui +0 -74
- package/Neurai/src/qt/guiconstants.h +0 -130
- package/Neurai/src/qt/guiutil.cpp +0 -1072
- package/Neurai/src/qt/guiutil.h +0 -273
- package/Neurai/src/qt/intro.cpp +0 -332
- package/Neurai/src/qt/intro.h +0 -80
- package/Neurai/src/qt/locale/neurai_af.ts +0 -1072
- package/Neurai/src/qt/locale/neurai_af_ZA.ts +0 -840
- package/Neurai/src/qt/locale/neurai_ar.ts +0 -2036
- package/Neurai/src/qt/locale/neurai_be_BY.ts +0 -1406
- package/Neurai/src/qt/locale/neurai_bg.ts +0 -3104
- package/Neurai/src/qt/locale/neurai_bg_BG.ts +0 -472
- package/Neurai/src/qt/locale/neurai_ca.ts +0 -3218
- package/Neurai/src/qt/locale/neurai_ca@valencia.ts +0 -2942
- package/Neurai/src/qt/locale/neurai_ca_ES.ts +0 -3242
- package/Neurai/src/qt/locale/neurai_cs.ts +0 -3726
- package/Neurai/src/qt/locale/neurai_cy.ts +0 -540
- package/Neurai/src/qt/locale/neurai_da.ts +0 -3731
- package/Neurai/src/qt/locale/neurai_de.ts +0 -5452
- package/Neurai/src/qt/locale/neurai_el.ts +0 -256
- package/Neurai/src/qt/locale/neurai_el_GR.ts +0 -2099
- package/Neurai/src/qt/locale/neurai_en.ts +0 -8344
- package/Neurai/src/qt/locale/neurai_en_GB.ts +0 -2522
- package/Neurai/src/qt/locale/neurai_eo.ts +0 -1482
- package/Neurai/src/qt/locale/neurai_es.ts +0 -4196
- package/Neurai/src/qt/locale/neurai_es_AR.ts +0 -220
- package/Neurai/src/qt/locale/neurai_es_CL.ts +0 -855
- package/Neurai/src/qt/locale/neurai_es_CO.ts +0 -356
- package/Neurai/src/qt/locale/neurai_es_DO.ts +0 -1285
- package/Neurai/src/qt/locale/neurai_es_ES.ts +0 -3579
- package/Neurai/src/qt/locale/neurai_es_MX.ts +0 -668
- package/Neurai/src/qt/locale/neurai_es_UY.ts +0 -487
- package/Neurai/src/qt/locale/neurai_es_VE.ts +0 -684
- package/Neurai/src/qt/locale/neurai_et.ts +0 -1874
- package/Neurai/src/qt/locale/neurai_et_EE.ts +0 -812
- package/Neurai/src/qt/locale/neurai_eu_ES.ts +0 -860
- package/Neurai/src/qt/locale/neurai_fa.ts +0 -1834
- package/Neurai/src/qt/locale/neurai_fa_IR.ts +0 -984
- package/Neurai/src/qt/locale/neurai_fi.ts +0 -2906
- package/Neurai/src/qt/locale/neurai_fr.ts +0 -4062
- package/Neurai/src/qt/locale/neurai_fr_CA.ts +0 -204
- package/Neurai/src/qt/locale/neurai_fr_FR.ts +0 -1819
- package/Neurai/src/qt/locale/neurai_gl.ts +0 -1180
- package/Neurai/src/qt/locale/neurai_he.ts +0 -3022
- package/Neurai/src/qt/locale/neurai_hi_IN.ts +0 -491
- package/Neurai/src/qt/locale/neurai_hr.ts +0 -1110
- package/Neurai/src/qt/locale/neurai_hu.ts +0 -1578
- package/Neurai/src/qt/locale/neurai_id_ID.ts +0 -2160
- package/Neurai/src/qt/locale/neurai_it.ts +0 -3519
- package/Neurai/src/qt/locale/neurai_it_IT.ts +0 -252
- package/Neurai/src/qt/locale/neurai_ja.ts +0 -3731
- package/Neurai/src/qt/locale/neurai_ka.ts +0 -1492
- package/Neurai/src/qt/locale/neurai_kk_KZ.ts +0 -368
- package/Neurai/src/qt/locale/neurai_ko_KR.ts +0 -5040
- package/Neurai/src/qt/locale/neurai_ku_IQ.ts +0 -428
- package/Neurai/src/qt/locale/neurai_ky.ts +0 -396
- package/Neurai/src/qt/locale/neurai_la.ts +0 -920
- package/Neurai/src/qt/locale/neurai_lt.ts +0 -1000
- package/Neurai/src/qt/locale/neurai_lv_LV.ts +0 -1232
- package/Neurai/src/qt/locale/neurai_mk_MK.ts +0 -614
- package/Neurai/src/qt/locale/neurai_mn.ts +0 -616
- package/Neurai/src/qt/locale/neurai_ms_MY.ts +0 -550
- package/Neurai/src/qt/locale/neurai_nb.ts +0 -4448
- package/Neurai/src/qt/locale/neurai_ne.ts +0 -644
- package/Neurai/src/qt/locale/neurai_nl.ts +0 -4264
- package/Neurai/src/qt/locale/neurai_pl.ts +0 -4802
- package/Neurai/src/qt/locale/neurai_pt_BR.ts +0 -4038
- package/Neurai/src/qt/locale/neurai_pt_PT.ts +0 -3507
- package/Neurai/src/qt/locale/neurai_ro.ts +0 -920
- package/Neurai/src/qt/locale/neurai_ro_RO.ts +0 -2414
- package/Neurai/src/qt/locale/neurai_ru.ts +0 -3726
- package/Neurai/src/qt/locale/neurai_ru_RU.ts +0 -852
- package/Neurai/src/qt/locale/neurai_sk.ts +0 -3539
- package/Neurai/src/qt/locale/neurai_sl_SI.ts +0 -1914
- package/Neurai/src/qt/locale/neurai_sq.ts +0 -832
- package/Neurai/src/qt/locale/neurai_sr.ts +0 -745
- package/Neurai/src/qt/locale/neurai_sr@latin.ts +0 -482
- package/Neurai/src/qt/locale/neurai_sv.ts +0 -3655
- package/Neurai/src/qt/locale/neurai_ta.ts +0 -744
- package/Neurai/src/qt/locale/neurai_th_TH.ts +0 -922
- package/Neurai/src/qt/locale/neurai_tr.ts +0 -6074
- package/Neurai/src/qt/locale/neurai_tr_TR.ts +0 -220
- package/Neurai/src/qt/locale/neurai_uk.ts +0 -3182
- package/Neurai/src/qt/locale/neurai_ur_PK.ts +0 -296
- package/Neurai/src/qt/locale/neurai_uz@Cyrl.ts +0 -1228
- package/Neurai/src/qt/locale/neurai_vi.ts +0 -212
- package/Neurai/src/qt/locale/neurai_vi_VN.ts +0 -1058
- package/Neurai/src/qt/locale/neurai_zh.ts +0 -244
- package/Neurai/src/qt/locale/neurai_zh_CN.ts +0 -3510
- package/Neurai/src/qt/locale/neurai_zh_HK.ts +0 -690
- package/Neurai/src/qt/locale/neurai_zh_TW.ts +0 -3731
- package/Neurai/src/qt/macdockiconhandler.h +0 -46
- package/Neurai/src/qt/macdockiconhandler.mm +0 -136
- package/Neurai/src/qt/macnotificationhandler.h +0 -29
- package/Neurai/src/qt/macnotificationhandler.mm +0 -79
- package/Neurai/src/qt/mnemonicdialog.cpp +0 -253
- package/Neurai/src/qt/mnemonicdialog.h +0 -105
- package/Neurai/src/qt/modaloverlay.cpp +0 -178
- package/Neurai/src/qt/modaloverlay.h +0 -52
- package/Neurai/src/qt/myrestrictedassetrecord.cpp +0 -85
- package/Neurai/src/qt/myrestrictedassetrecord.h +0 -79
- package/Neurai/src/qt/myrestrictedassettablemodel.cpp +0 -551
- package/Neurai/src/qt/myrestrictedassettablemodel.h +0 -99
- package/Neurai/src/qt/networkstyle.cpp +0 -99
- package/Neurai/src/qt/networkstyle.h +0 -37
- package/Neurai/src/qt/neurai-qt.config +0 -2
- package/Neurai/src/qt/neurai-qt.creator +0 -1
- package/Neurai/src/qt/neurai-qt.creator.user +0 -198
- package/Neurai/src/qt/neurai-qt.files +0 -118
- package/Neurai/src/qt/neurai-qt.includes +0 -2
- package/Neurai/src/qt/neurai.cpp +0 -785
- package/Neurai/src/qt/neurai.qrc +0 -156
- package/Neurai/src/qt/neurai_locale.qrc +0 -89
- package/Neurai/src/qt/neuraiaddressvalidator.cpp +0 -99
- package/Neurai/src/qt/neuraiaddressvalidator.h +0 -37
- package/Neurai/src/qt/neuraiamountfield.cpp +0 -431
- package/Neurai/src/qt/neuraiamountfield.h +0 -130
- package/Neurai/src/qt/neuraigui.cpp +0 -1958
- package/Neurai/src/qt/neuraigui.h +0 -364
- package/Neurai/src/qt/neuraistrings.cpp +0 -569
- package/Neurai/src/qt/neuraiunits.cpp +0 -288
- package/Neurai/src/qt/neuraiunits.h +0 -140
- package/Neurai/src/qt/notificator.cpp +0 -262
- package/Neurai/src/qt/notificator.h +0 -79
- package/Neurai/src/qt/openuridialog.cpp +0 -54
- package/Neurai/src/qt/openuridialog.h +0 -36
- package/Neurai/src/qt/optionsdialog.cpp +0 -373
- package/Neurai/src/qt/optionsdialog.h +0 -76
- package/Neurai/src/qt/optionsmodel.cpp +0 -558
- package/Neurai/src/qt/optionsmodel.h +0 -120
- package/Neurai/src/qt/overviewpage.cpp +0 -730
- package/Neurai/src/qt/overviewpage.h +0 -97
- package/Neurai/src/qt/paymentrequest.proto +0 -48
- package/Neurai/src/qt/paymentrequestplus.cpp +0 -219
- package/Neurai/src/qt/paymentrequestplus.h +0 -53
- package/Neurai/src/qt/paymentserver.cpp +0 -812
- package/Neurai/src/qt/paymentserver.h +0 -150
- package/Neurai/src/qt/peertablemodel.cpp +0 -254
- package/Neurai/src/qt/peertablemodel.h +0 -87
- package/Neurai/src/qt/platformstyle.cpp +0 -288
- package/Neurai/src/qt/platformstyle.h +0 -84
- package/Neurai/src/qt/qvalidatedlineedit.cpp +0 -129
- package/Neurai/src/qt/qvalidatedlineedit.h +0 -45
- package/Neurai/src/qt/qvaluecombobox.cpp +0 -33
- package/Neurai/src/qt/qvaluecombobox.h +0 -39
- package/Neurai/src/qt/receivecoinsdialog.cpp +0 -345
- package/Neurai/src/qt/receivecoinsdialog.h +0 -81
- package/Neurai/src/qt/receiverequestdialog.cpp +0 -215
- package/Neurai/src/qt/receiverequestdialog.h +0 -73
- package/Neurai/src/qt/recentrequeststablemodel.cpp +0 -242
- package/Neurai/src/qt/recentrequeststablemodel.h +0 -109
- package/Neurai/src/qt/reissueassetdialog.cpp +0 -1494
- package/Neurai/src/qt/reissueassetdialog.h +0 -145
- package/Neurai/src/qt/res/darkstyle/darkstyle.qss +0 -343
- package/Neurai/src/qt/res/darkstyle/icon_branch_closed.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_branch_end.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_branch_more.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_branch_open.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_checked.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_checked_disabled.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_checked_pressed.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_indeterminate.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_indeterminate_disabled.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_indeterminate_pressed.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_unchecked.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_unchecked_disabled.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_checkbox_unchecked_pressed.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_close.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_radiobutton_checked.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_radiobutton_checked_disabled.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_radiobutton_checked_pressed.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_radiobutton_unchecked.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_radiobutton_unchecked_disabled.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_radiobutton_unchecked_pressed.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_restore.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_undock.png +0 -0
- package/Neurai/src/qt/res/darkstyle/icon_vline.png +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-Bold.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-Italic.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-Light.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-LightItalic.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-Regular.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-SemiBold.ttf +0 -0
- package/Neurai/src/qt/res/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/Neurai/src/qt/res/icons/about.png +0 -0
- package/Neurai/src/qt/res/icons/about_qt.png +0 -0
- package/Neurai/src/qt/res/icons/add.png +0 -0
- package/Neurai/src/qt/res/icons/address-book.png +0 -0
- package/Neurai/src/qt/res/icons/asset_administrator.png +0 -0
- package/Neurai/src/qt/res/icons/asset_administrator_dark.png +0 -0
- package/Neurai/src/qt/res/icons/asset_create.png +0 -0
- package/Neurai/src/qt/res/icons/asset_create_selected.png +0 -0
- package/Neurai/src/qt/res/icons/asset_manage.png +0 -0
- package/Neurai/src/qt/res/icons/asset_manage_selected.png +0 -0
- package/Neurai/src/qt/res/icons/asset_transfer.png +0 -0
- package/Neurai/src/qt/res/icons/asset_transfer_selected.png +0 -0
- package/Neurai/src/qt/res/icons/chevron.png +0 -0
- package/Neurai/src/qt/res/icons/clock1.png +0 -0
- package/Neurai/src/qt/res/icons/clock2.png +0 -0
- package/Neurai/src/qt/res/icons/clock3.png +0 -0
- package/Neurai/src/qt/res/icons/clock4.png +0 -0
- package/Neurai/src/qt/res/icons/clock5.png +0 -0
- package/Neurai/src/qt/res/icons/configure.png +0 -0
- package/Neurai/src/qt/res/icons/connect0.png +0 -0
- package/Neurai/src/qt/res/icons/connect1.png +0 -0
- package/Neurai/src/qt/res/icons/connect2.png +0 -0
- package/Neurai/src/qt/res/icons/connect3.png +0 -0
- package/Neurai/src/qt/res/icons/connect4.png +0 -0
- package/Neurai/src/qt/res/icons/debugwindow.png +0 -0
- package/Neurai/src/qt/res/icons/edit.png +0 -0
- package/Neurai/src/qt/res/icons/editcopy.png +0 -0
- package/Neurai/src/qt/res/icons/editpaste.png +0 -0
- package/Neurai/src/qt/res/icons/export.png +0 -0
- package/Neurai/src/qt/res/icons/external_link.png +0 -0
- package/Neurai/src/qt/res/icons/external_link_dark.png +0 -0
- package/Neurai/src/qt/res/icons/eye.png +0 -0
- package/Neurai/src/qt/res/icons/eye_minus.png +0 -0
- package/Neurai/src/qt/res/icons/eye_plus.png +0 -0
- package/Neurai/src/qt/res/icons/filesave.png +0 -0
- package/Neurai/src/qt/res/icons/fontbigger.png +0 -0
- package/Neurai/src/qt/res/icons/fontsmaller.png +0 -0
- package/Neurai/src/qt/res/icons/hd_disabled.png +0 -0
- package/Neurai/src/qt/res/icons/hd_enabled.png +0 -0
- package/Neurai/src/qt/res/icons/hd_enabled_44.png +0 -0
- package/Neurai/src/qt/res/icons/history.png +0 -0
- package/Neurai/src/qt/res/icons/history_selected.png +0 -0
- package/Neurai/src/qt/res/icons/info.png +0 -0
- package/Neurai/src/qt/res/icons/key.png +0 -0
- package/Neurai/src/qt/res/icons/lock_closed.png +0 -0
- package/Neurai/src/qt/res/icons/lock_open.png +0 -0
- package/Neurai/src/qt/res/icons/network_disabled.png +0 -0
- package/Neurai/src/qt/res/icons/neurai.icns +0 -0
- package/Neurai/src/qt/res/icons/neurai.ico +0 -0
- package/Neurai/src/qt/res/icons/neurai.png +0 -0
- package/Neurai/src/qt/res/icons/neurai_testnet.ico +0 -0
- package/Neurai/src/qt/res/icons/neuraitext.png +0 -0
- package/Neurai/src/qt/res/icons/open.png +0 -0
- package/Neurai/src/qt/res/icons/overview.png +0 -0
- package/Neurai/src/qt/res/icons/overview_selected.png +0 -0
- package/Neurai/src/qt/res/icons/quit.png +0 -0
- package/Neurai/src/qt/res/icons/receive.png +0 -0
- package/Neurai/src/qt/res/icons/receive_selected.png +0 -0
- package/Neurai/src/qt/res/icons/refresh.png +0 -0
- package/Neurai/src/qt/res/icons/remove.png +0 -0
- package/Neurai/src/qt/res/icons/restricted_asset.png +0 -0
- package/Neurai/src/qt/res/icons/restricted_asset_selected.png +0 -0
- package/Neurai/src/qt/res/icons/send.png +0 -0
- package/Neurai/src/qt/res/icons/send_selected.png +0 -0
- package/Neurai/src/qt/res/icons/synced.png +0 -0
- package/Neurai/src/qt/res/icons/transaction0.png +0 -0
- package/Neurai/src/qt/res/icons/transaction2.png +0 -0
- package/Neurai/src/qt/res/icons/transaction_abandoned.png +0 -0
- package/Neurai/src/qt/res/icons/transaction_conflicted.png +0 -0
- package/Neurai/src/qt/res/icons/tx_asset_input.png +0 -0
- package/Neurai/src/qt/res/icons/tx_asset_output.png +0 -0
- package/Neurai/src/qt/res/icons/tx_atomic_swap.png +0 -0
- package/Neurai/src/qt/res/icons/tx_inout.png +0 -0
- package/Neurai/src/qt/res/icons/tx_input.png +0 -0
- package/Neurai/src/qt/res/icons/tx_mined.png +0 -0
- package/Neurai/src/qt/res/icons/tx_output.png +0 -0
- package/Neurai/src/qt/res/icons/verify.png +0 -0
- package/Neurai/src/qt/res/icons/warning.png +0 -0
- package/Neurai/src/qt/res/icons/xnatext.png +0 -0
- package/Neurai/src/qt/res/movies/makespinner.sh +0 -13
- package/Neurai/src/qt/res/movies/spinner-000.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-001.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-002.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-003.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-004.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-005.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-006.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-007.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-008.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-009.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-010.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-011.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-012.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-013.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-014.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-015.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-016.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-017.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-018.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-019.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-020.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-021.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-022.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-023.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-024.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-025.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-026.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-027.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-028.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-029.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-030.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-031.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-032.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-033.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-034.png +0 -0
- package/Neurai/src/qt/res/movies/spinner-035.png +0 -0
- package/Neurai/src/qt/res/neurai-qt-res.rc +0 -38
- package/Neurai/src/qt/res/src/clock_0.svg +0 -14
- package/Neurai/src/qt/res/src/clock_1.svg +0 -15
- package/Neurai/src/qt/res/src/clock_2.svg +0 -13
- package/Neurai/src/qt/res/src/clock_3.svg +0 -15
- package/Neurai/src/qt/res/src/clock_4.svg +0 -23
- package/Neurai/src/qt/res/src/connect-0.svg +0 -66
- package/Neurai/src/qt/res/src/connect-1.svg +0 -69
- package/Neurai/src/qt/res/src/connect-2.svg +0 -59
- package/Neurai/src/qt/res/src/connect-3.svg +0 -72
- package/Neurai/src/qt/res/src/connect-4.svg +0 -65
- package/Neurai/src/qt/res/src/hd_disabled.svg +0 -26
- package/Neurai/src/qt/res/src/hd_enabled.svg +0 -13
- package/Neurai/src/qt/res/src/mine.svg +0 -12
- package/Neurai/src/qt/res/src/network_disabled.svg +0 -49
- package/Neurai/src/qt/res/src/neurai.svg +0 -37
- package/Neurai/src/qt/res/src/qt.svg +0 -26
- package/Neurai/src/qt/res/src/spinner.png +0 -0
- package/Neurai/src/qt/res/src/transaction0.svg +0 -35
- package/Neurai/src/qt/res/src/tx_in.svg +0 -9
- package/Neurai/src/qt/res/src/tx_inout.svg +0 -11
- package/Neurai/src/qt/res/src/verify.svg +0 -14
- package/Neurai/src/qt/restrictedassetsdialog.cpp +0 -468
- package/Neurai/src/qt/restrictedassetsdialog.h +0 -77
- package/Neurai/src/qt/restrictedassignqualifier.cpp +0 -221
- package/Neurai/src/qt/restrictedassignqualifier.h +0 -67
- package/Neurai/src/qt/restrictedfreezeaddress.cpp +0 -240
- package/Neurai/src/qt/restrictedfreezeaddress.h +0 -68
- package/Neurai/src/qt/rpcconsole.cpp +0 -1287
- package/Neurai/src/qt/rpcconsole.h +0 -174
- package/Neurai/src/qt/sendassetsentry.cpp +0 -571
- package/Neurai/src/qt/sendassetsentry.h +0 -96
- package/Neurai/src/qt/sendcoinsdialog.cpp +0 -1015
- package/Neurai/src/qt/sendcoinsdialog.h +0 -128
- package/Neurai/src/qt/sendcoinsentry.cpp +0 -293
- package/Neurai/src/qt/sendcoinsentry.h +0 -75
- package/Neurai/src/qt/signverifymessagedialog.cpp +0 -280
- package/Neurai/src/qt/signverifymessagedialog.h +0 -55
- package/Neurai/src/qt/splashscreen.cpp +0 -258
- package/Neurai/src/qt/splashscreen.h +0 -59
- package/Neurai/src/qt/test/compattests.cpp +0 -25
- package/Neurai/src/qt/test/compattests.h +0 -21
- package/Neurai/src/qt/test/paymentrequestdata.h +0 -462
- package/Neurai/src/qt/test/paymentservertests.cpp +0 -213
- package/Neurai/src/qt/test/paymentservertests.h +0 -37
- package/Neurai/src/qt/test/rpcnestedtests.cpp +0 -135
- package/Neurai/src/qt/test/rpcnestedtests.h +0 -27
- package/Neurai/src/qt/test/test_main.cpp +0 -116
- package/Neurai/src/qt/test/uritests.cpp +0 -68
- package/Neurai/src/qt/test/uritests.h +0 -21
- package/Neurai/src/qt/test/wallettests.cpp +0 -265
- package/Neurai/src/qt/test/wallettests.h +0 -15
- package/Neurai/src/qt/trafficgraphwidget.cpp +0 -178
- package/Neurai/src/qt/trafficgraphwidget.h +0 -50
- package/Neurai/src/qt/transactiondesc.cpp +0 -478
- package/Neurai/src/qt/transactiondesc.h +0 -35
- package/Neurai/src/qt/transactiondescdialog.cpp +0 -30
- package/Neurai/src/qt/transactiondescdialog.h +0 -33
- package/Neurai/src/qt/transactionfilterproxy.cpp +0 -126
- package/Neurai/src/qt/transactionfilterproxy.h +0 -71
- package/Neurai/src/qt/transactionrecord.cpp +0 -543
- package/Neurai/src/qt/transactionrecord.h +0 -151
- package/Neurai/src/qt/transactiontablemodel.cpp +0 -857
- package/Neurai/src/qt/transactiontablemodel.h +0 -125
- package/Neurai/src/qt/transactionview.cpp +0 -690
- package/Neurai/src/qt/transactionview.h +0 -126
- package/Neurai/src/qt/utilitydialog.cpp +0 -201
- package/Neurai/src/qt/utilitydialog.h +0 -53
- package/Neurai/src/qt/walletframe.cpp +0 -243
- package/Neurai/src/qt/walletframe.h +0 -109
- package/Neurai/src/qt/walletmodel.cpp +0 -924
- package/Neurai/src/qt/walletmodel.h +0 -372
- package/Neurai/src/qt/walletmodeltransaction.cpp +0 -100
- package/Neurai/src/qt/walletmodeltransaction.h +0 -50
- package/Neurai/src/qt/walletview.cpp +0 -454
- package/Neurai/src/qt/walletview.h +0 -160
- package/Neurai/src/qt/winshutdownmonitor.cpp +0 -72
- package/Neurai/src/qt/winshutdownmonitor.h +0 -31
- package/Neurai/src/random.cpp +0 -469
- package/Neurai/src/random.h +0 -170
- package/Neurai/src/rest.cpp +0 -597
- package/Neurai/src/reverse_iterator.h +0 -39
- package/Neurai/src/reverselock.h +0 -36
- package/Neurai/src/rpc/assets.cpp +0 -3404
- package/Neurai/src/rpc/blockchain.cpp +0 -1938
- package/Neurai/src/rpc/blockchain.h +0 -45
- package/Neurai/src/rpc/client.cpp +0 -307
- package/Neurai/src/rpc/client.h +0 -24
- package/Neurai/src/rpc/messages.cpp +0 -1653
- package/Neurai/src/rpc/mining.cpp +0 -1299
- package/Neurai/src/rpc/mining.h +0 -25
- package/Neurai/src/rpc/misc.cpp +0 -1414
- package/Neurai/src/rpc/net.cpp +0 -674
- package/Neurai/src/rpc/protocol.cpp +0 -158
- package/Neurai/src/rpc/protocol.h +0 -106
- package/Neurai/src/rpc/rawtransaction.cpp +0 -2220
- package/Neurai/src/rpc/register.h +0 -43
- package/Neurai/src/rpc/rewards.cpp +0 -503
- package/Neurai/src/rpc/safemode.cpp +0 -14
- package/Neurai/src/rpc/safemode.h +0 -14
- package/Neurai/src/rpc/server.cpp +0 -674
- package/Neurai/src/rpc/server.h +0 -205
- package/Neurai/src/rpc/test.json +0 -45
- package/Neurai/src/scheduler.cpp +0 -211
- package/Neurai/src/scheduler.h +0 -115
- package/Neurai/src/script/interpreter.cpp +0 -1756
- package/Neurai/src/script/interpreter.h +0 -193
- package/Neurai/src/script/ismine.cpp +0 -205
- package/Neurai/src/script/ismine.h +0 -43
- package/Neurai/src/script/neuraiconsensus.cpp +0 -131
- package/Neurai/src/script/neuraiconsensus.h +0 -85
- package/Neurai/src/script/script.cpp +0 -601
- package/Neurai/src/script/script.h +0 -742
- package/Neurai/src/script/script_error.cpp +0 -99
- package/Neurai/src/script/script_error.h +0 -76
- package/Neurai/src/script/sigcache.cpp +0 -96
- package/Neurai/src/script/sigcache.h +0 -58
- package/Neurai/src/script/sign.cpp +0 -482
- package/Neurai/src/script/sign.h +0 -86
- package/Neurai/src/script/standard.cpp +0 -414
- package/Neurai/src/script/standard.h +0 -162
- package/Neurai/src/secp256k1/.travis.yml +0 -108
- package/Neurai/src/secp256k1/COPYING +0 -19
- package/Neurai/src/secp256k1/Makefile.am +0 -164
- package/Neurai/src/secp256k1/README.md +0 -104
- package/Neurai/src/secp256k1/SECURITY.md +0 -15
- package/Neurai/src/secp256k1/autogen.sh +0 -3
- package/Neurai/src/secp256k1/build-aux/compile +0 -351
- package/Neurai/src/secp256k1/build-aux/config.guess +0 -1815
- package/Neurai/src/secp256k1/build-aux/config.sub +0 -2354
- package/Neurai/src/secp256k1/build-aux/depcomp +0 -792
- package/Neurai/src/secp256k1/build-aux/install-sh +0 -541
- package/Neurai/src/secp256k1/build-aux/ltmain.sh +0 -11523
- package/Neurai/src/secp256k1/build-aux/m4/ax_prog_cc_for_build.m4 +0 -125
- package/Neurai/src/secp256k1/build-aux/m4/bitcoin_secp.m4 +0 -89
- package/Neurai/src/secp256k1/build-aux/m4/libtool.m4 +0 -8513
- package/Neurai/src/secp256k1/build-aux/m4/ltoptions.m4 +0 -467
- package/Neurai/src/secp256k1/build-aux/m4/ltsugar.m4 +0 -124
- package/Neurai/src/secp256k1/build-aux/m4/ltversion.m4 +0 -24
- package/Neurai/src/secp256k1/build-aux/m4/lt~obsolete.m4 +0 -99
- package/Neurai/src/secp256k1/build-aux/missing +0 -236
- package/Neurai/src/secp256k1/build-aux/test-driver +0 -160
- package/Neurai/src/secp256k1/configure.ac +0 -529
- package/Neurai/src/secp256k1/contrib/lax_der_parsing.c +0 -149
- package/Neurai/src/secp256k1/contrib/lax_der_parsing.h +0 -91
- package/Neurai/src/secp256k1/contrib/lax_der_privatekey_parsing.c +0 -113
- package/Neurai/src/secp256k1/contrib/lax_der_privatekey_parsing.h +0 -90
- package/Neurai/src/secp256k1/contrib/travis.sh +0 -68
- package/Neurai/src/secp256k1/include/secp256k1.h +0 -764
- package/Neurai/src/secp256k1/include/secp256k1_ecdh.h +0 -62
- package/Neurai/src/secp256k1/include/secp256k1_extrakeys.h +0 -236
- package/Neurai/src/secp256k1/include/secp256k1_preallocated.h +0 -128
- package/Neurai/src/secp256k1/include/secp256k1_recovery.h +0 -110
- package/Neurai/src/secp256k1/include/secp256k1_schnorrsig.h +0 -111
- package/Neurai/src/secp256k1/libsecp256k1.pc.in +0 -13
- package/Neurai/src/secp256k1/sage/gen_exhaustive_groups.sage +0 -129
- package/Neurai/src/secp256k1/sage/group_prover.sage +0 -322
- package/Neurai/src/secp256k1/sage/secp256k1.sage +0 -306
- package/Neurai/src/secp256k1/sage/weierstrass_prover.sage +0 -264
- package/Neurai/src/secp256k1/src/asm/field_10x26_arm.s +0 -913
- package/Neurai/src/secp256k1/src/assumptions.h +0 -80
- package/Neurai/src/secp256k1/src/basic-config.h +0 -34
- package/Neurai/src/secp256k1/src/bench.h +0 -133
- package/Neurai/src/secp256k1/src/bench_ecdh.c +0 -59
- package/Neurai/src/secp256k1/src/bench_ecmult.c +0 -214
- package/Neurai/src/secp256k1/src/bench_internal.c +0 -431
- package/Neurai/src/secp256k1/src/bench_recover.c +0 -62
- package/Neurai/src/secp256k1/src/bench_schnorrsig.c +0 -102
- package/Neurai/src/secp256k1/src/bench_sign.c +0 -58
- package/Neurai/src/secp256k1/src/bench_verify.c +0 -115
- package/Neurai/src/secp256k1/src/ecdsa.h +0 -21
- package/Neurai/src/secp256k1/src/ecdsa_impl.h +0 -315
- package/Neurai/src/secp256k1/src/eckey.h +0 -25
- package/Neurai/src/secp256k1/src/eckey_impl.h +0 -96
- package/Neurai/src/secp256k1/src/ecmult.h +0 -46
- package/Neurai/src/secp256k1/src/ecmult_const.h +0 -20
- package/Neurai/src/secp256k1/src/ecmult_const_impl.h +0 -254
- package/Neurai/src/secp256k1/src/ecmult_gen.h +0 -50
- package/Neurai/src/secp256k1/src/ecmult_gen_impl.h +0 -208
- package/Neurai/src/secp256k1/src/ecmult_impl.h +0 -1083
- package/Neurai/src/secp256k1/src/field.h +0 -134
- package/Neurai/src/secp256k1/src/field_10x26.h +0 -50
- package/Neurai/src/secp256k1/src/field_10x26_impl.h +0 -1167
- package/Neurai/src/secp256k1/src/field_5x52.h +0 -55
- package/Neurai/src/secp256k1/src/field_5x52_asm_impl.h +0 -502
- package/Neurai/src/secp256k1/src/field_5x52_impl.h +0 -501
- package/Neurai/src/secp256k1/src/field_5x52_int128_impl.h +0 -279
- package/Neurai/src/secp256k1/src/field_impl.h +0 -320
- package/Neurai/src/secp256k1/src/gen_context.c +0 -88
- package/Neurai/src/secp256k1/src/group.h +0 -151
- package/Neurai/src/secp256k1/src/group_impl.h +0 -693
- package/Neurai/src/secp256k1/src/hash.h +0 -41
- package/Neurai/src/secp256k1/src/hash_impl.h +0 -297
- package/Neurai/src/secp256k1/src/libsecp256k1-config.h.in +0 -139
- package/Neurai/src/secp256k1/src/modules/ecdh/Makefile.am.include +0 -8
- package/Neurai/src/secp256k1/src/modules/ecdh/main_impl.h +0 -71
- package/Neurai/src/secp256k1/src/modules/ecdh/tests_impl.h +0 -132
- package/Neurai/src/secp256k1/src/modules/extrakeys/Makefile.am.include +0 -4
- package/Neurai/src/secp256k1/src/modules/extrakeys/main_impl.h +0 -251
- package/Neurai/src/secp256k1/src/modules/extrakeys/tests_exhaustive_impl.h +0 -68
- package/Neurai/src/secp256k1/src/modules/extrakeys/tests_impl.h +0 -524
- package/Neurai/src/secp256k1/src/modules/recovery/Makefile.am.include +0 -9
- package/Neurai/src/secp256k1/src/modules/recovery/main_impl.h +0 -160
- package/Neurai/src/secp256k1/src/modules/recovery/tests_exhaustive_impl.h +0 -149
- package/Neurai/src/secp256k1/src/modules/recovery/tests_impl.h +0 -393
- package/Neurai/src/secp256k1/src/modules/schnorrsig/Makefile.am.include +0 -9
- package/Neurai/src/secp256k1/src/modules/schnorrsig/main_impl.h +0 -239
- package/Neurai/src/secp256k1/src/modules/schnorrsig/tests_exhaustive_impl.h +0 -206
- package/Neurai/src/secp256k1/src/modules/schnorrsig/tests_impl.h +0 -806
- package/Neurai/src/secp256k1/src/num.h +0 -74
- package/Neurai/src/secp256k1/src/num_gmp.h +0 -20
- package/Neurai/src/secp256k1/src/num_gmp_impl.h +0 -288
- package/Neurai/src/secp256k1/src/num_impl.h +0 -24
- package/Neurai/src/secp256k1/src/scalar.h +0 -117
- package/Neurai/src/secp256k1/src/scalar_4x64.h +0 -19
- package/Neurai/src/secp256k1/src/scalar_4x64_impl.h +0 -958
- package/Neurai/src/secp256k1/src/scalar_8x32.h +0 -19
- package/Neurai/src/secp256k1/src/scalar_8x32_impl.h +0 -734
- package/Neurai/src/secp256k1/src/scalar_impl.h +0 -516
- package/Neurai/src/secp256k1/src/scalar_low.h +0 -17
- package/Neurai/src/secp256k1/src/scalar_low_impl.h +0 -128
- package/Neurai/src/secp256k1/src/scratch.h +0 -42
- package/Neurai/src/secp256k1/src/scratch_impl.h +0 -99
- package/Neurai/src/secp256k1/src/secp256k1.c +0 -774
- package/Neurai/src/secp256k1/src/selftest.h +0 -32
- package/Neurai/src/secp256k1/src/testrand.h +0 -47
- package/Neurai/src/secp256k1/src/testrand_impl.h +0 -158
- package/Neurai/src/secp256k1/src/tests.c +0 -5737
- package/Neurai/src/secp256k1/src/tests_exhaustive.c +0 -454
- package/Neurai/src/secp256k1/src/util.h +0 -273
- package/Neurai/src/secp256k1/src/valgrind_ctime_test.c +0 -157
- package/Neurai/src/serialize.h +0 -979
- package/Neurai/src/spentindex.h +0 -98
- package/Neurai/src/streams.h +0 -711
- package/Neurai/src/support/allocators/secure.h +0 -61
- package/Neurai/src/support/allocators/zeroafterfree.h +0 -50
- package/Neurai/src/support/cleanse.cpp +0 -41
- package/Neurai/src/support/cleanse.h +0 -16
- package/Neurai/src/support/events.h +0 -58
- package/Neurai/src/support/lockedpool.cpp +0 -392
- package/Neurai/src/support/lockedpool.h +0 -233
- package/Neurai/src/sync.cpp +0 -182
- package/Neurai/src/sync.h +0 -291
- package/Neurai/src/test/DoS_tests.cpp +0 -286
- package/Neurai/src/test/README.md +0 -84
- package/Neurai/src/test/addrman_tests.cpp +0 -560
- package/Neurai/src/test/allocator_tests.cpp +0 -255
- package/Neurai/src/test/amount_tests.cpp +0 -118
- package/Neurai/src/test/arith_uint256_tests.cpp +0 -629
- package/Neurai/src/test/assets/asset_reissue_tests.cpp +0 -207
- package/Neurai/src/test/assets/asset_tests.cpp +0 -735
- package/Neurai/src/test/assets/asset_tx_tests.cpp +0 -610
- package/Neurai/src/test/assets/cache_tests.cpp +0 -41
- package/Neurai/src/test/assets/messaging_tests.cpp +0 -82
- package/Neurai/src/test/assets/null_asset_data_tests.cpp +0 -77
- package/Neurai/src/test/assets/qualifier_tests.cpp +0 -122
- package/Neurai/src/test/assets/restricted_tests.cpp +0 -188
- package/Neurai/src/test/assets/serialization_tests.cpp +0 -179
- package/Neurai/src/test/assets/unique_tests.cpp +0 -65
- package/Neurai/src/test/assets/verifier_string_tests.cpp +0 -371
- package/Neurai/src/test/base32_tests.cpp +0 -29
- package/Neurai/src/test/base58_tests.cpp +0 -282
- package/Neurai/src/test/base64_tests.cpp +0 -29
- package/Neurai/src/test/bech32_tests.cpp +0 -75
- package/Neurai/src/test/bip32_tests.cpp +0 -179
- package/Neurai/src/test/bip39_tests.cpp +0 -67
- package/Neurai/src/test/blockencodings_tests.cpp +0 -360
- package/Neurai/src/test/bloom_tests.cpp +0 -574
- package/Neurai/src/test/bswap_tests.cpp +0 -30
- package/Neurai/src/test/checkqueue_tests.cpp +0 -554
- package/Neurai/src/test/coins_tests.cpp +0 -949
- package/Neurai/src/test/compress_tests.cpp +0 -72
- package/Neurai/src/test/crypto_tests.cpp +0 -599
- package/Neurai/src/test/cuckoocache_tests.cpp +0 -406
- package/Neurai/src/test/data/README.md +0 -12
- package/Neurai/src/test/data/base58_encode_decode.json +0 -14
- package/Neurai/src/test/data/base58_keys_invalid.json +0 -152
- package/Neurai/src/test/data/base58_keys_valid.json +0 -452
- package/Neurai/src/test/data/bip39_vectors.json +0 -146
- package/Neurai/src/test/data/script_tests.json +0 -2607
- package/Neurai/src/test/data/sighash.json +0 -503
- package/Neurai/src/test/data/tx_invalid.json +0 -344
- package/Neurai/src/test/data/tx_valid.json +0 -514
- package/Neurai/src/test/dbwrapper_tests.cpp +0 -365
- package/Neurai/src/test/getarg_tests.cpp +0 -173
- package/Neurai/src/test/hash_tests.cpp +0 -185
- package/Neurai/src/test/kawpow_tests.cpp +0 -142
- package/Neurai/src/test/key_tests.cpp +0 -169
- package/Neurai/src/test/limitedmap_tests.cpp +0 -112
- package/Neurai/src/test/main_tests.cpp +0 -91
- package/Neurai/src/test/mempool_tests.cpp +0 -601
- package/Neurai/src/test/merkle_tests.cpp +0 -152
- package/Neurai/src/test/merkleblock_tests.cpp +0 -84
- package/Neurai/src/test/miner_tests.cpp +0 -661
- package/Neurai/src/test/multisig_tests.cpp +0 -240
- package/Neurai/src/test/net_tests.cpp +0 -202
- package/Neurai/src/test/netbase_tests.cpp +0 -318
- package/Neurai/src/test/pmt_tests.cpp +0 -139
- package/Neurai/src/test/policyestimator_tests.cpp +0 -209
- package/Neurai/src/test/pow_tests.cpp +0 -100
- package/Neurai/src/test/prevector_tests.cpp +0 -321
- package/Neurai/src/test/raii_event_tests.cpp +0 -102
- package/Neurai/src/test/random_tests.cpp +0 -98
- package/Neurai/src/test/reverselock_tests.cpp +0 -68
- package/Neurai/src/test/rpc_tests.cpp +0 -393
- package/Neurai/src/test/sanity_tests.cpp +0 -24
- package/Neurai/src/test/scheduler_tests.cpp +0 -127
- package/Neurai/src/test/script_P2PKH_tests.cpp +0 -65
- package/Neurai/src/test/script_P2PK_tests.cpp +0 -52
- package/Neurai/src/test/script_P2SH_tests.cpp +0 -392
- package/Neurai/src/test/script_standard_tests.cpp +0 -802
- package/Neurai/src/test/script_tests.cpp +0 -1650
- package/Neurai/src/test/scriptnum10.h +0 -222
- package/Neurai/src/test/scriptnum_tests.cpp +0 -207
- package/Neurai/src/test/serialize_tests.cpp +0 -439
- package/Neurai/src/test/sighash_tests.cpp +0 -225
- package/Neurai/src/test/sigopcount_tests.cpp +0 -242
- package/Neurai/src/test/skiplist_tests.cpp +0 -207
- package/Neurai/src/test/streams_tests.cpp +0 -129
- package/Neurai/src/test/test_neurai.cpp +0 -183
- package/Neurai/src/test/test_neurai.h +0 -164
- package/Neurai/src/test/test_neurai_fuzzy.cpp +0 -339
- package/Neurai/src/test/test_neurai_hash.cpp +0 -39
- package/Neurai/src/test/test_neurai_main.cpp +0 -28
- package/Neurai/src/test/timedata_tests.cpp +0 -41
- package/Neurai/src/test/torcontrol_tests.cpp +0 -204
- package/Neurai/src/test/transaction_tests.cpp +0 -867
- package/Neurai/src/test/txvalidationcache_tests.cpp +0 -398
- package/Neurai/src/test/uint256_tests.cpp +0 -279
- package/Neurai/src/test/univalue_tests.cpp +0 -347
- package/Neurai/src/test/util_tests.cpp +0 -674
- package/Neurai/src/test/versionbits_tests.cpp +0 -392
- package/Neurai/src/threadinterrupt.cpp +0 -43
- package/Neurai/src/threadinterrupt.h +0 -36
- package/Neurai/src/threadsafety.h +0 -57
- package/Neurai/src/timedata.cpp +0 -122
- package/Neurai/src/timedata.h +0 -80
- package/Neurai/src/timestampindex.h +0 -131
- package/Neurai/src/tinyformat.h +0 -1056
- package/Neurai/src/torcontrol.cpp +0 -779
- package/Neurai/src/torcontrol.h +0 -22
- package/Neurai/src/txdb.cpp +0 -654
- package/Neurai/src/txdb.h +0 -158
- package/Neurai/src/txmempool.cpp +0 -1520
- package/Neurai/src/txmempool.h +0 -850
- package/Neurai/src/ui_interface.cpp +0 -31
- package/Neurai/src/ui_interface.h +0 -130
- package/Neurai/src/uint256.cpp +0 -81
- package/Neurai/src/uint256.h +0 -180
- package/Neurai/src/undo.h +0 -124
- package/Neurai/src/univalue/.travis.yml +0 -52
- package/Neurai/src/univalue/COPYING +0 -19
- package/Neurai/src/univalue/Makefile.am +0 -116
- package/Neurai/src/univalue/README.md +0 -32
- package/Neurai/src/univalue/TODO +0 -10
- package/Neurai/src/univalue/autogen.sh +0 -9
- package/Neurai/src/univalue/build-aux/compile +0 -351
- package/Neurai/src/univalue/build-aux/config.guess +0 -1815
- package/Neurai/src/univalue/build-aux/config.sub +0 -2354
- package/Neurai/src/univalue/build-aux/depcomp +0 -792
- package/Neurai/src/univalue/build-aux/install-sh +0 -541
- package/Neurai/src/univalue/build-aux/ltmain.sh +0 -11523
- package/Neurai/src/univalue/build-aux/m4/libtool.m4 +0 -8513
- package/Neurai/src/univalue/build-aux/m4/ltoptions.m4 +0 -467
- package/Neurai/src/univalue/build-aux/m4/ltsugar.m4 +0 -124
- package/Neurai/src/univalue/build-aux/m4/ltversion.m4 +0 -24
- package/Neurai/src/univalue/build-aux/m4/lt~obsolete.m4 +0 -99
- package/Neurai/src/univalue/build-aux/missing +0 -236
- package/Neurai/src/univalue/build-aux/test-driver +0 -160
- package/Neurai/src/univalue/configure.ac +0 -69
- package/Neurai/src/univalue/gen/gen.cpp +0 -85
- package/Neurai/src/univalue/include/univalue.h +0 -305
- package/Neurai/src/univalue/lib/univalue.cpp +0 -244
- package/Neurai/src/univalue/lib/univalue_escapes.h +0 -262
- package/Neurai/src/univalue/lib/univalue_get.cpp +0 -198
- package/Neurai/src/univalue/lib/univalue_read.cpp +0 -451
- package/Neurai/src/univalue/lib/univalue_utffilter.h +0 -119
- package/Neurai/src/univalue/lib/univalue_write.cpp +0 -115
- package/Neurai/src/univalue/pc/libunivalue-uninstalled.pc.in +0 -9
- package/Neurai/src/univalue/pc/libunivalue.pc.in +0 -10
- package/Neurai/src/univalue/test/fail1.json +0 -1
- package/Neurai/src/univalue/test/fail10.json +0 -1
- package/Neurai/src/univalue/test/fail11.json +0 -1
- package/Neurai/src/univalue/test/fail12.json +0 -1
- package/Neurai/src/univalue/test/fail13.json +0 -1
- package/Neurai/src/univalue/test/fail14.json +0 -1
- package/Neurai/src/univalue/test/fail15.json +0 -1
- package/Neurai/src/univalue/test/fail16.json +0 -1
- package/Neurai/src/univalue/test/fail17.json +0 -1
- package/Neurai/src/univalue/test/fail18.json +0 -1
- package/Neurai/src/univalue/test/fail19.json +0 -1
- package/Neurai/src/univalue/test/fail2.json +0 -1
- package/Neurai/src/univalue/test/fail20.json +0 -1
- package/Neurai/src/univalue/test/fail21.json +0 -1
- package/Neurai/src/univalue/test/fail22.json +0 -1
- package/Neurai/src/univalue/test/fail23.json +0 -1
- package/Neurai/src/univalue/test/fail24.json +0 -1
- package/Neurai/src/univalue/test/fail25.json +0 -1
- package/Neurai/src/univalue/test/fail26.json +0 -1
- package/Neurai/src/univalue/test/fail27.json +0 -2
- package/Neurai/src/univalue/test/fail28.json +0 -2
- package/Neurai/src/univalue/test/fail29.json +0 -1
- package/Neurai/src/univalue/test/fail3.json +0 -1
- package/Neurai/src/univalue/test/fail30.json +0 -1
- package/Neurai/src/univalue/test/fail31.json +0 -1
- package/Neurai/src/univalue/test/fail32.json +0 -1
- package/Neurai/src/univalue/test/fail33.json +0 -1
- package/Neurai/src/univalue/test/fail34.json +0 -1
- package/Neurai/src/univalue/test/fail35.json +0 -1
- package/Neurai/src/univalue/test/fail36.json +0 -1
- package/Neurai/src/univalue/test/fail37.json +0 -1
- package/Neurai/src/univalue/test/fail38.json +0 -1
- package/Neurai/src/univalue/test/fail39.json +0 -1
- package/Neurai/src/univalue/test/fail4.json +0 -1
- package/Neurai/src/univalue/test/fail40.json +0 -1
- package/Neurai/src/univalue/test/fail41.json +0 -1
- package/Neurai/src/univalue/test/fail42.json +0 -0
- package/Neurai/src/univalue/test/fail44.json +0 -1
- package/Neurai/src/univalue/test/fail5.json +0 -1
- package/Neurai/src/univalue/test/fail6.json +0 -1
- package/Neurai/src/univalue/test/fail7.json +0 -1
- package/Neurai/src/univalue/test/fail8.json +0 -1
- package/Neurai/src/univalue/test/fail9.json +0 -1
- package/Neurai/src/univalue/test/no_nul.cpp +0 -8
- package/Neurai/src/univalue/test/object.cpp +0 -397
- package/Neurai/src/univalue/test/pass1.json +0 -58
- package/Neurai/src/univalue/test/pass2.json +0 -1
- package/Neurai/src/univalue/test/pass3.json +0 -6
- package/Neurai/src/univalue/test/round1.json +0 -1
- package/Neurai/src/univalue/test/round2.json +0 -1
- package/Neurai/src/univalue/test/round3.json +0 -1
- package/Neurai/src/univalue/test/round4.json +0 -1
- package/Neurai/src/univalue/test/round5.json +0 -1
- package/Neurai/src/univalue/test/round6.json +0 -1
- package/Neurai/src/univalue/test/round7.json +0 -1
- package/Neurai/src/univalue/test/test_json.cpp +0 -24
- package/Neurai/src/univalue/test/unitester.cpp +0 -170
- package/Neurai/src/univalue/univalue-config.h.in +0 -63
- package/Neurai/src/util.cpp +0 -955
- package/Neurai/src/util.h +0 -366
- package/Neurai/src/utilmoneystr.cpp +0 -79
- package/Neurai/src/utilmoneystr.h +0 -26
- package/Neurai/src/utilstrencodings.cpp +0 -736
- package/Neurai/src/utilstrencodings.h +0 -160
- package/Neurai/src/utiltime.cpp +0 -89
- package/Neurai/src/utiltime.h +0 -34
- package/Neurai/src/validation.cpp +0 -5949
- package/Neurai/src/validation.h +0 -620
- package/Neurai/src/validationinterface.cpp +0 -146
- package/Neurai/src/validationinterface.h +0 -115
- package/Neurai/src/version.h +0 -64
- package/Neurai/src/versionbits.cpp +0 -244
- package/Neurai/src/versionbits.h +0 -84
- package/Neurai/src/wallet/bip39.cpp +0 -236
- package/Neurai/src/wallet/bip39.h +0 -67
- package/Neurai/src/wallet/bip39_chinese_simplified.h +0 -2074
- package/Neurai/src/wallet/bip39_chinese_traditional.h +0 -2074
- package/Neurai/src/wallet/bip39_english.h +0 -2074
- package/Neurai/src/wallet/bip39_french.h +0 -2074
- package/Neurai/src/wallet/bip39_italian.h +0 -2074
- package/Neurai/src/wallet/bip39_japanese.h +0 -2074
- package/Neurai/src/wallet/bip39_korean.h +0 -2074
- package/Neurai/src/wallet/bip39_spanish.h +0 -2074
- package/Neurai/src/wallet/coincontrol.h +0 -134
- package/Neurai/src/wallet/crypter.cpp +0 -413
- package/Neurai/src/wallet/crypter.h +0 -208
- package/Neurai/src/wallet/db.cpp +0 -728
- package/Neurai/src/wallet/db.h +0 -373
- package/Neurai/src/wallet/feebumper.cpp +0 -292
- package/Neurai/src/wallet/feebumper.h +0 -63
- package/Neurai/src/wallet/fees.cpp +0 -91
- package/Neurai/src/wallet/fees.h +0 -36
- package/Neurai/src/wallet/init.cpp +0 -288
- package/Neurai/src/wallet/init.h +0 -45
- package/Neurai/src/wallet/rpcdump.cpp +0 -1363
- package/Neurai/src/wallet/rpcwallet.cpp +0 -3589
- package/Neurai/src/wallet/rpcwallet.h +0 -30
- package/Neurai/src/wallet/test/accounting_tests.cpp +0 -142
- package/Neurai/src/wallet/test/crypto_tests.cpp +0 -136
- package/Neurai/src/wallet/test/wallet_test_fixture.cpp +0 -37
- package/Neurai/src/wallet/test/wallet_test_fixture.h +0 -22
- package/Neurai/src/wallet/test/wallet_tests.cpp +0 -720
- package/Neurai/src/wallet/wallet.cpp +0 -4998
- package/Neurai/src/wallet/wallet.h +0 -1307
- package/Neurai/src/wallet/walletdb.cpp +0 -1049
- package/Neurai/src/wallet/walletdb.h +0 -292
- package/Neurai/src/warnings.cpp +0 -85
- package/Neurai/src/warnings.h +0 -29
- package/Neurai/src/zmq/zmqabstractnotifier.cpp +0 -29
- package/Neurai/src/zmq/zmqabstractnotifier.h +0 -48
- package/Neurai/src/zmq/zmqconfig.h +0 -26
- package/Neurai/src/zmq/zmqnotificationinterface.cpp +0 -202
- package/Neurai/src/zmq/zmqnotificationinterface.h +0 -43
- package/Neurai/src/zmq/zmqpublishnotifier.cpp +0 -209
- package/Neurai/src/zmq/zmqpublishnotifier.h +0 -64
- package/Neurai/test/README.md +0 -187
- package/Neurai/test/config.ini.in +0 -20
- package/Neurai/test/functional/README.md +0 -102
- package/Neurai/test/functional/combine_logs.py +0 -123
- package/Neurai/test/functional/combined_log_template.html +0 -40
- package/Neurai/test/functional/create_cache.py +0 -30
- package/Neurai/test/functional/example_test.py +0 -194
- package/Neurai/test/functional/feature_assets.py +0 -365
- package/Neurai/test/functional/feature_assets_mempool.py +0 -153
- package/Neurai/test/functional/feature_assets_reorg.py +0 -154
- package/Neurai/test/functional/feature_assumevalid.py +0 -199
- package/Neurai/test/functional/feature_bip68_sequence.py +0 -387
- package/Neurai/test/functional/feature_cltv.py +0 -164
- package/Neurai/test/functional/feature_dbcrash.py +0 -284
- package/Neurai/test/functional/feature_dersig.py +0 -155
- package/Neurai/test/functional/feature_fee_estimation.py +0 -265
- package/Neurai/test/functional/feature_listmyassets.py +0 -56
- package/Neurai/test/functional/feature_loadblock.py +0 -89
- package/Neurai/test/functional/feature_maxreorgdepth.py +0 -138
- package/Neurai/test/functional/feature_maxuploadtarget.py +0 -183
- package/Neurai/test/functional/feature_messaging.py +0 -139
- package/Neurai/test/functional/feature_minchainwork.py +0 -91
- package/Neurai/test/functional/feature_notifications.py +0 -90
- package/Neurai/test/functional/feature_nulldummy.py +0 -137
- package/Neurai/test/functional/feature_proxy.py +0 -200
- package/Neurai/test/functional/feature_pruning.py +0 -457
- package/Neurai/test/functional/feature_raw_restricted_assets.py +0 -568
- package/Neurai/test/functional/feature_rawassettransactions.py +0 -1845
- package/Neurai/test/functional/feature_rbf.py +0 -571
- package/Neurai/test/functional/feature_reindex.py +0 -43
- package/Neurai/test/functional/feature_restricted_assets.py +0 -591
- package/Neurai/test/functional/feature_rewards.py +0 -1270
- package/Neurai/test/functional/feature_segwit.py +0 -642
- package/Neurai/test/functional/feature_shutdown.py +0 -36
- package/Neurai/test/functional/feature_uacomment.py +0 -37
- package/Neurai/test/functional/feature_unique_assets.py +0 -144
- package/Neurai/test/functional/feature_versionbits_warning.py +0 -131
- package/Neurai/test/functional/interface_http.py +0 -110
- package/Neurai/test/functional/interface_neurai_cli.py +0 -59
- package/Neurai/test/functional/interface_rest.py +0 -329
- package/Neurai/test/functional/interface_rpc.py +0 -77
- package/Neurai/test/functional/interface_zmq.py +0 -125
- package/Neurai/test/functional/mempool_limit.py +0 -68
- package/Neurai/test/functional/mempool_packages.py +0 -245
- package/Neurai/test/functional/mempool_persist.py +0 -112
- package/Neurai/test/functional/mempool_reorg.py +0 -98
- package/Neurai/test/functional/mempool_resurrect.py +0 -70
- package/Neurai/test/functional/mempool_spend_coinbase.py +0 -54
- package/Neurai/test/functional/mining_basic.py +0 -136
- package/Neurai/test/functional/mining_getblocktemplate_longpoll.py +0 -72
- package/Neurai/test/functional/mining_prioritisetransaction.py +0 -130
- package/Neurai/test/functional/p2p_compactblocks.py +0 -939
- package/Neurai/test/functional/p2p_disconnect_ban.py +0 -104
- package/Neurai/test/functional/p2p_feefilter.py +0 -103
- package/Neurai/test/functional/p2p_fingerprint.py +0 -151
- package/Neurai/test/functional/p2p_leak.py +0 -149
- package/Neurai/test/functional/p2p_leak_tx.py +0 -58
- package/Neurai/test/functional/p2p_mempool.py +0 -40
- package/Neurai/test/functional/p2p_segwit.py +0 -1988
- package/Neurai/test/functional/p2p_sendheaders.py +0 -554
- package/Neurai/test/functional/p2p_timeouts.py +0 -85
- package/Neurai/test/functional/p2p_unrequested_blocks.py +0 -250
- package/Neurai/test/functional/rpc_addressindex.py +0 -349
- package/Neurai/test/functional/rpc_assettransfer.py +0 -138
- package/Neurai/test/functional/rpc_bind.py +0 -108
- package/Neurai/test/functional/rpc_blockchain.py +0 -220
- package/Neurai/test/functional/rpc_decodescript.py +0 -210
- package/Neurai/test/functional/rpc_deprecated.py +0 -26
- package/Neurai/test/functional/rpc_fundrawtransaction.py +0 -716
- package/Neurai/test/functional/rpc_getchaintips.py +0 -66
- package/Neurai/test/functional/rpc_invalidateblock.py +0 -67
- package/Neurai/test/functional/rpc_misc.py +0 -57
- package/Neurai/test/functional/rpc_named_arguments.py +0 -35
- package/Neurai/test/functional/rpc_net.py +0 -95
- package/Neurai/test/functional/rpc_preciousblock.py +0 -113
- package/Neurai/test/functional/rpc_rawtransaction.py +0 -225
- package/Neurai/test/functional/rpc_setban.py +0 -50
- package/Neurai/test/functional/rpc_signmessage.py +0 -40
- package/Neurai/test/functional/rpc_signrawtransaction.py +0 -144
- package/Neurai/test/functional/rpc_spentindex.py +0 -141
- package/Neurai/test/functional/rpc_timestampindex.py +0 -60
- package/Neurai/test/functional/rpc_txindex.py +0 -73
- package/Neurai/test/functional/rpc_txoutproof.py +0 -85
- package/Neurai/test/functional/rpc_uptime.py +0 -31
- package/Neurai/test/functional/rpc_users.py +0 -154
- package/Neurai/test/functional/test_framework/__init__.py +0 -0
- package/Neurai/test/functional/test_framework/address.py +0 -81
- package/Neurai/test/functional/test_framework/authproxy.py +0 -201
- package/Neurai/test/functional/test_framework/bignum.py +0 -58
- package/Neurai/test/functional/test_framework/blocktools.py +0 -116
- package/Neurai/test/functional/test_framework/coverage.py +0 -113
- package/Neurai/test/functional/test_framework/key.py +0 -389
- package/Neurai/test/functional/test_framework/messages.py +0 -1648
- package/Neurai/test/functional/test_framework/mininode.py +0 -481
- package/Neurai/test/functional/test_framework/netutil.py +0 -167
- package/Neurai/test/functional/test_framework/script.py +0 -707
- package/Neurai/test/functional/test_framework/siphash.py +0 -64
- package/Neurai/test/functional/test_framework/socks5.py +0 -161
- package/Neurai/test/functional/test_framework/test_framework.py +0 -448
- package/Neurai/test/functional/test_framework/test_node.py +0 -231
- package/Neurai/test/functional/test_framework/util.py +0 -737
- package/Neurai/test/functional/test_framework/wallet_util.py +0 -3563
- package/Neurai/test/functional/test_runner.py +0 -733
- package/Neurai/test/functional/wallet_abandonconflict.py +0 -153
- package/Neurai/test/functional/wallet_backup.py +0 -198
- package/Neurai/test/functional/wallet_basic.py +0 -426
- package/Neurai/test/functional/wallet_bip44.py +0 -148
- package/Neurai/test/functional/wallet_bip44_multilanguage.py +0 -195
- package/Neurai/test/functional/wallet_bumpfee.py +0 -302
- package/Neurai/test/functional/wallet_coinbase_category.py +0 -56
- package/Neurai/test/functional/wallet_create_tx.py +0 -76
- package/Neurai/test/functional/wallet_disable.py +0 -37
- package/Neurai/test/functional/wallet_dump.py +0 -110
- package/Neurai/test/functional/wallet_encryption.py +0 -59
- package/Neurai/test/functional/wallet_groups.py +0 -89
- package/Neurai/test/functional/wallet_hd.py +0 -122
- package/Neurai/test/functional/wallet_import_rescan.py +0 -193
- package/Neurai/test/functional/wallet_import_with_label.py +0 -86
- package/Neurai/test/functional/wallet_importmulti.py +0 -453
- package/Neurai/test/functional/wallet_importprunedfunds.py +0 -118
- package/Neurai/test/functional/wallet_keypool.py +0 -86
- package/Neurai/test/functional/wallet_keypool_topup.py +0 -75
- package/Neurai/test/functional/wallet_labels.py +0 -135
- package/Neurai/test/functional/wallet_listreceivedby.py +0 -146
- package/Neurai/test/functional/wallet_listsinceblock.py +0 -250
- package/Neurai/test/functional/wallet_listtransactions.py +0 -207
- package/Neurai/test/functional/wallet_multiwallet.py +0 -91
- package/Neurai/test/functional/wallet_reorgsrestore.py +0 -97
- package/Neurai/test/functional/wallet_resendtransactions.py +0 -31
- package/Neurai/test/functional/wallet_txn_clone.py +0 -159
- package/Neurai/test/functional/wallet_txn_doublespend.py +0 -140
- package/Neurai/test/functional/wallet_zapwallettxes.py +0 -78
- package/Neurai/test/util/data/blanktxv1.hex +0 -1
- package/Neurai/test/util/data/blanktxv1.json +0 -13
- package/Neurai/test/util/data/blanktxv2.hex +0 -1
- package/Neurai/test/util/data/blanktxv2.json +0 -13
- package/Neurai/test/util/data/neurai-util-test.json +0 -410
- package/Neurai/test/util/data/tt-delin1-out.hex +0 -1
- package/Neurai/test/util/data/tt-delin1-out.json +0 -219
- package/Neurai/test/util/data/tt-delout1-out.hex +0 -1
- package/Neurai/test/util/data/tt-delout1-out.json +0 -215
- package/Neurai/test/util/data/tt-locktime317000-out.hex +0 -1
- package/Neurai/test/util/data/tt-locktime317000-out.json +0 -228
- package/Neurai/test/util/data/tx394b54bb.hex +0 -1
- package/Neurai/test/util/data/txcreate1.hex +0 -1
- package/Neurai/test/util/data/txcreate1.json +0 -66
- package/Neurai/test/util/data/txcreate2.hex +0 -1
- package/Neurai/test/util/data/txcreate2.json +0 -22
- package/Neurai/test/util/data/txcreatedata1.hex +0 -1
- package/Neurai/test/util/data/txcreatedata1.json +0 -44
- package/Neurai/test/util/data/txcreatedata2.hex +0 -1
- package/Neurai/test/util/data/txcreatedata2.json +0 -44
- package/Neurai/test/util/data/txcreatedata_seq0.hex +0 -1
- package/Neurai/test/util/data/txcreatedata_seq0.json +0 -35
- package/Neurai/test/util/data/txcreatedata_seq1.hex +0 -1
- package/Neurai/test/util/data/txcreatedata_seq1.json +0 -44
- package/Neurai/test/util/data/txcreatemultisig1.hex +0 -1
- package/Neurai/test/util/data/txcreatemultisig1.json +0 -28
- package/Neurai/test/util/data/txcreatemultisig2.hex +0 -1
- package/Neurai/test/util/data/txcreatemultisig2.json +0 -26
- package/Neurai/test/util/data/txcreatemultisig3.hex +0 -1
- package/Neurai/test/util/data/txcreatemultisig3.json +0 -22
- package/Neurai/test/util/data/txcreatemultisig4.hex +0 -1
- package/Neurai/test/util/data/txcreatemultisig4.json +0 -26
- package/Neurai/test/util/data/txcreatemultisig5.json +0 -26
- package/Neurai/test/util/data/txcreateoutpubkey1.hex +0 -1
- package/Neurai/test/util/data/txcreateoutpubkey1.json +0 -26
- package/Neurai/test/util/data/txcreateoutpubkey2.hex +0 -1
- package/Neurai/test/util/data/txcreateoutpubkey2.json +0 -22
- package/Neurai/test/util/data/txcreateoutpubkey3.hex +0 -1
- package/Neurai/test/util/data/txcreateoutpubkey3.json +0 -26
- package/Neurai/test/util/data/txcreatescript1.hex +0 -1
- package/Neurai/test/util/data/txcreatescript1.json +0 -22
- package/Neurai/test/util/data/txcreatescript2.hex +0 -1
- package/Neurai/test/util/data/txcreatescript2.json +0 -26
- package/Neurai/test/util/data/txcreatescript3.hex +0 -1
- package/Neurai/test/util/data/txcreatescript3.json +0 -22
- package/Neurai/test/util/data/txcreatescript4.hex +0 -1
- package/Neurai/test/util/data/txcreatescript4.json +0 -26
- package/Neurai/test/util/data/txcreatesignv1.hex +0 -1
- package/Neurai/test/util/data/txcreatesignv1.json +0 -35
- package/Neurai/test/util/data/txcreatesignv2.hex +0 -1
- package/Neurai/test/util/neurai-util-test.py +0 -186
- package/test-getpubkey.js +0 -149
|
@@ -1,1568 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
-
|
|
5
|
-
#include "db/db_impl.h"
|
|
6
|
-
|
|
7
|
-
#include <algorithm>
|
|
8
|
-
#include <set>
|
|
9
|
-
#include <string>
|
|
10
|
-
#include <stdint.h>
|
|
11
|
-
#include <stdio.h>
|
|
12
|
-
#include <vector>
|
|
13
|
-
#include "db/builder.h"
|
|
14
|
-
#include "db/db_iter.h"
|
|
15
|
-
#include "db/dbformat.h"
|
|
16
|
-
#include "db/filename.h"
|
|
17
|
-
#include "db/log_reader.h"
|
|
18
|
-
#include "db/log_writer.h"
|
|
19
|
-
#include "db/memtable.h"
|
|
20
|
-
#include "db/table_cache.h"
|
|
21
|
-
#include "db/version_set.h"
|
|
22
|
-
#include "db/write_batch_internal.h"
|
|
23
|
-
#include "leveldb/db.h"
|
|
24
|
-
#include "leveldb/env.h"
|
|
25
|
-
#include "leveldb/status.h"
|
|
26
|
-
#include "leveldb/table.h"
|
|
27
|
-
#include "leveldb/table_builder.h"
|
|
28
|
-
#include "port/port.h"
|
|
29
|
-
#include "table/block.h"
|
|
30
|
-
#include "table/merger.h"
|
|
31
|
-
#include "table/two_level_iterator.h"
|
|
32
|
-
#include "util/coding.h"
|
|
33
|
-
#include "util/logging.h"
|
|
34
|
-
#include "util/mutexlock.h"
|
|
35
|
-
|
|
36
|
-
namespace leveldb {
|
|
37
|
-
|
|
38
|
-
const int kNumNonTableCacheFiles = 10;
|
|
39
|
-
|
|
40
|
-
// Information kept for every waiting writer
|
|
41
|
-
struct DBImpl::Writer {
|
|
42
|
-
Status status;
|
|
43
|
-
WriteBatch* batch;
|
|
44
|
-
bool sync;
|
|
45
|
-
bool done;
|
|
46
|
-
port::CondVar cv;
|
|
47
|
-
|
|
48
|
-
explicit Writer(port::Mutex* mu) : cv(mu) { }
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
struct DBImpl::CompactionState {
|
|
52
|
-
Compaction* const compaction;
|
|
53
|
-
|
|
54
|
-
// Sequence numbers < smallest_snapshot are not significant since we
|
|
55
|
-
// will never have to service a snapshot below smallest_snapshot.
|
|
56
|
-
// Therefore if we have seen a sequence number S <= smallest_snapshot,
|
|
57
|
-
// we can drop all entries for the same key with sequence numbers < S.
|
|
58
|
-
SequenceNumber smallest_snapshot;
|
|
59
|
-
|
|
60
|
-
// Files produced by compaction
|
|
61
|
-
struct Output {
|
|
62
|
-
uint64_t number;
|
|
63
|
-
uint64_t file_size;
|
|
64
|
-
InternalKey smallest, largest;
|
|
65
|
-
};
|
|
66
|
-
std::vector<Output> outputs;
|
|
67
|
-
|
|
68
|
-
// State kept for output being generated
|
|
69
|
-
WritableFile* outfile;
|
|
70
|
-
TableBuilder* builder;
|
|
71
|
-
|
|
72
|
-
uint64_t total_bytes;
|
|
73
|
-
|
|
74
|
-
Output* current_output() { return &outputs[outputs.size()-1]; }
|
|
75
|
-
|
|
76
|
-
explicit CompactionState(Compaction* c)
|
|
77
|
-
: compaction(c),
|
|
78
|
-
outfile(NULL),
|
|
79
|
-
builder(NULL),
|
|
80
|
-
total_bytes(0) {
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// Fix user-supplied options to be reasonable
|
|
85
|
-
template <class T,class V>
|
|
86
|
-
static void ClipToRange(T* ptr, V minvalue, V maxvalue) {
|
|
87
|
-
if (static_cast<V>(*ptr) > maxvalue) *ptr = maxvalue;
|
|
88
|
-
if (static_cast<V>(*ptr) < minvalue) *ptr = minvalue;
|
|
89
|
-
}
|
|
90
|
-
Options SanitizeOptions(const std::string& dbname,
|
|
91
|
-
const InternalKeyComparator* icmp,
|
|
92
|
-
const InternalFilterPolicy* ipolicy,
|
|
93
|
-
const Options& src) {
|
|
94
|
-
Options result = src;
|
|
95
|
-
result.comparator = icmp;
|
|
96
|
-
result.filter_policy = (src.filter_policy != NULL) ? ipolicy : NULL;
|
|
97
|
-
ClipToRange(&result.max_open_files, 64 + kNumNonTableCacheFiles, 50000);
|
|
98
|
-
ClipToRange(&result.write_buffer_size, 64<<10, 1<<30);
|
|
99
|
-
ClipToRange(&result.max_file_size, 1<<20, 1<<30);
|
|
100
|
-
ClipToRange(&result.block_size, 1<<10, 4<<20);
|
|
101
|
-
if (result.info_log == NULL) {
|
|
102
|
-
// Open a log file in the same directory as the db
|
|
103
|
-
src.env->CreateDir(dbname); // In case it does not exist
|
|
104
|
-
src.env->RenameFile(InfoLogFileName(dbname), OldInfoLogFileName(dbname));
|
|
105
|
-
Status s = src.env->NewLogger(InfoLogFileName(dbname), &result.info_log);
|
|
106
|
-
if (!s.ok()) {
|
|
107
|
-
// No place suitable for logging
|
|
108
|
-
result.info_log = NULL;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (result.block_cache == NULL) {
|
|
112
|
-
result.block_cache = NewLRUCache(8 << 20);
|
|
113
|
-
}
|
|
114
|
-
return result;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
DBImpl::DBImpl(const Options& raw_options, const std::string& dbname)
|
|
118
|
-
: env_(raw_options.env),
|
|
119
|
-
internal_comparator_(raw_options.comparator),
|
|
120
|
-
internal_filter_policy_(raw_options.filter_policy),
|
|
121
|
-
options_(SanitizeOptions(dbname, &internal_comparator_,
|
|
122
|
-
&internal_filter_policy_, raw_options)),
|
|
123
|
-
owns_info_log_(options_.info_log != raw_options.info_log),
|
|
124
|
-
owns_cache_(options_.block_cache != raw_options.block_cache),
|
|
125
|
-
dbname_(dbname),
|
|
126
|
-
db_lock_(NULL),
|
|
127
|
-
shutting_down_(NULL),
|
|
128
|
-
bg_cv_(&mutex_),
|
|
129
|
-
mem_(NULL),
|
|
130
|
-
imm_(NULL),
|
|
131
|
-
logfile_(NULL),
|
|
132
|
-
logfile_number_(0),
|
|
133
|
-
log_(NULL),
|
|
134
|
-
seed_(0),
|
|
135
|
-
tmp_batch_(new WriteBatch),
|
|
136
|
-
bg_compaction_scheduled_(false),
|
|
137
|
-
manual_compaction_(NULL) {
|
|
138
|
-
has_imm_.Release_Store(NULL);
|
|
139
|
-
|
|
140
|
-
// Reserve ten files or so for other uses and give the rest to TableCache.
|
|
141
|
-
const int table_cache_size = options_.max_open_files - kNumNonTableCacheFiles;
|
|
142
|
-
table_cache_ = new TableCache(dbname_, &options_, table_cache_size);
|
|
143
|
-
|
|
144
|
-
versions_ = new VersionSet(dbname_, &options_, table_cache_,
|
|
145
|
-
&internal_comparator_);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
DBImpl::~DBImpl() {
|
|
149
|
-
// Wait for background work to finish
|
|
150
|
-
mutex_.Lock();
|
|
151
|
-
shutting_down_.Release_Store(this); // Any non-NULL value is ok
|
|
152
|
-
while (bg_compaction_scheduled_) {
|
|
153
|
-
bg_cv_.Wait();
|
|
154
|
-
}
|
|
155
|
-
mutex_.Unlock();
|
|
156
|
-
|
|
157
|
-
if (db_lock_ != NULL) {
|
|
158
|
-
env_->UnlockFile(db_lock_);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
delete versions_;
|
|
162
|
-
if (mem_ != NULL) mem_->Unref();
|
|
163
|
-
if (imm_ != NULL) imm_->Unref();
|
|
164
|
-
delete tmp_batch_;
|
|
165
|
-
delete log_;
|
|
166
|
-
delete logfile_;
|
|
167
|
-
delete table_cache_;
|
|
168
|
-
|
|
169
|
-
if (owns_info_log_) {
|
|
170
|
-
delete options_.info_log;
|
|
171
|
-
}
|
|
172
|
-
if (owns_cache_) {
|
|
173
|
-
delete options_.block_cache;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
Status DBImpl::NewDB() {
|
|
178
|
-
VersionEdit new_db;
|
|
179
|
-
new_db.SetComparatorName(user_comparator()->Name());
|
|
180
|
-
new_db.SetLogNumber(0);
|
|
181
|
-
new_db.SetNextFile(2);
|
|
182
|
-
new_db.SetLastSequence(0);
|
|
183
|
-
|
|
184
|
-
const std::string manifest = DescriptorFileName(dbname_, 1);
|
|
185
|
-
WritableFile* file;
|
|
186
|
-
Status s = env_->NewWritableFile(manifest, &file);
|
|
187
|
-
if (!s.ok()) {
|
|
188
|
-
return s;
|
|
189
|
-
}
|
|
190
|
-
{
|
|
191
|
-
log::Writer log(file);
|
|
192
|
-
std::string record;
|
|
193
|
-
new_db.EncodeTo(&record);
|
|
194
|
-
s = log.AddRecord(record);
|
|
195
|
-
if (s.ok()) {
|
|
196
|
-
s = file->Close();
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
delete file;
|
|
200
|
-
if (s.ok()) {
|
|
201
|
-
// Make "CURRENT" file that points to the new manifest file.
|
|
202
|
-
s = SetCurrentFile(env_, dbname_, 1);
|
|
203
|
-
} else {
|
|
204
|
-
env_->DeleteFile(manifest);
|
|
205
|
-
}
|
|
206
|
-
return s;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
void DBImpl::MaybeIgnoreError(Status* s) const {
|
|
210
|
-
if (s->ok() || options_.paranoid_checks) {
|
|
211
|
-
// No change needed
|
|
212
|
-
} else {
|
|
213
|
-
Log(options_.info_log, "Ignoring error %s", s->ToString().c_str());
|
|
214
|
-
*s = Status::OK();
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
void DBImpl::DeleteObsoleteFiles() {
|
|
219
|
-
if (!bg_error_.ok()) {
|
|
220
|
-
// After a background error, we don't know whether a new version may
|
|
221
|
-
// or may not have been committed, so we cannot safely garbage collect.
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Make a set of all of the live files
|
|
226
|
-
std::set<uint64_t> live = pending_outputs_;
|
|
227
|
-
versions_->AddLiveFiles(&live);
|
|
228
|
-
|
|
229
|
-
std::vector<std::string> filenames;
|
|
230
|
-
env_->GetChildren(dbname_, &filenames); // Ignoring errors on purpose
|
|
231
|
-
uint64_t number;
|
|
232
|
-
FileType type;
|
|
233
|
-
for (size_t i = 0; i < filenames.size(); i++) {
|
|
234
|
-
if (ParseFileName(filenames[i], &number, &type)) {
|
|
235
|
-
bool keep = true;
|
|
236
|
-
switch (type) {
|
|
237
|
-
case kLogFile:
|
|
238
|
-
keep = ((number >= versions_->LogNumber()) ||
|
|
239
|
-
(number == versions_->PrevLogNumber()));
|
|
240
|
-
break;
|
|
241
|
-
case kDescriptorFile:
|
|
242
|
-
// Keep my manifest file, and any newer incarnations'
|
|
243
|
-
// (in case there is a race that allows other incarnations)
|
|
244
|
-
keep = (number >= versions_->ManifestFileNumber());
|
|
245
|
-
break;
|
|
246
|
-
case kTableFile:
|
|
247
|
-
keep = (live.find(number) != live.end());
|
|
248
|
-
break;
|
|
249
|
-
case kTempFile:
|
|
250
|
-
// Any temp files that are currently being written to must
|
|
251
|
-
// be recorded in pending_outputs_, which is inserted into "live"
|
|
252
|
-
keep = (live.find(number) != live.end());
|
|
253
|
-
break;
|
|
254
|
-
case kCurrentFile:
|
|
255
|
-
case kDBLockFile:
|
|
256
|
-
case kInfoLogFile:
|
|
257
|
-
keep = true;
|
|
258
|
-
break;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
if (!keep) {
|
|
262
|
-
if (type == kTableFile) {
|
|
263
|
-
table_cache_->Evict(number);
|
|
264
|
-
}
|
|
265
|
-
Log(options_.info_log, "Delete type=%d #%lld\n",
|
|
266
|
-
int(type),
|
|
267
|
-
static_cast<unsigned long long>(number));
|
|
268
|
-
env_->DeleteFile(dbname_ + "/" + filenames[i]);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
Status DBImpl::Recover(VersionEdit* edit, bool *save_manifest) {
|
|
275
|
-
mutex_.AssertHeld();
|
|
276
|
-
|
|
277
|
-
// Ignore error from CreateDir since the creation of the DB is
|
|
278
|
-
// committed only when the descriptor is created, and this directory
|
|
279
|
-
// may already exist from a previous failed creation attempt.
|
|
280
|
-
env_->CreateDir(dbname_);
|
|
281
|
-
assert(db_lock_ == NULL);
|
|
282
|
-
Status s = env_->LockFile(LockFileName(dbname_), &db_lock_);
|
|
283
|
-
if (!s.ok()) {
|
|
284
|
-
return s;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
if (!env_->FileExists(CurrentFileName(dbname_))) {
|
|
288
|
-
if (options_.create_if_missing) {
|
|
289
|
-
s = NewDB();
|
|
290
|
-
if (!s.ok()) {
|
|
291
|
-
return s;
|
|
292
|
-
}
|
|
293
|
-
} else {
|
|
294
|
-
return Status::InvalidArgument(
|
|
295
|
-
dbname_, "does not exist (create_if_missing is false)");
|
|
296
|
-
}
|
|
297
|
-
} else {
|
|
298
|
-
if (options_.error_if_exists) {
|
|
299
|
-
return Status::InvalidArgument(
|
|
300
|
-
dbname_, "exists (error_if_exists is true)");
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
s = versions_->Recover(save_manifest);
|
|
305
|
-
if (!s.ok()) {
|
|
306
|
-
return s;
|
|
307
|
-
}
|
|
308
|
-
SequenceNumber max_sequence(0);
|
|
309
|
-
|
|
310
|
-
// Recover from all newer log files than the ones named in the
|
|
311
|
-
// descriptor (new log files may have been added by the previous
|
|
312
|
-
// incarnation without registering them in the descriptor).
|
|
313
|
-
//
|
|
314
|
-
// Note that PrevLogNumber() is no longer used, but we pay
|
|
315
|
-
// attention to it in case we are recovering a database
|
|
316
|
-
// produced by an older version of leveldb.
|
|
317
|
-
const uint64_t min_log = versions_->LogNumber();
|
|
318
|
-
const uint64_t prev_log = versions_->PrevLogNumber();
|
|
319
|
-
std::vector<std::string> filenames;
|
|
320
|
-
s = env_->GetChildren(dbname_, &filenames);
|
|
321
|
-
if (!s.ok()) {
|
|
322
|
-
return s;
|
|
323
|
-
}
|
|
324
|
-
std::set<uint64_t> expected;
|
|
325
|
-
versions_->AddLiveFiles(&expected);
|
|
326
|
-
uint64_t number;
|
|
327
|
-
FileType type;
|
|
328
|
-
std::vector<uint64_t> logs;
|
|
329
|
-
for (size_t i = 0; i < filenames.size(); i++) {
|
|
330
|
-
if (ParseFileName(filenames[i], &number, &type)) {
|
|
331
|
-
expected.erase(number);
|
|
332
|
-
if (type == kLogFile && ((number >= min_log) || (number == prev_log)))
|
|
333
|
-
logs.push_back(number);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
if (!expected.empty()) {
|
|
337
|
-
char buf[50];
|
|
338
|
-
snprintf(buf, sizeof(buf), "%d missing files; e.g.",
|
|
339
|
-
static_cast<int>(expected.size()));
|
|
340
|
-
return Status::Corruption(buf, TableFileName(dbname_, *(expected.begin())));
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// Recover in the order in which the logs were generated
|
|
344
|
-
std::sort(logs.begin(), logs.end());
|
|
345
|
-
for (size_t i = 0; i < logs.size(); i++) {
|
|
346
|
-
s = RecoverLogFile(logs[i], (i == logs.size() - 1), save_manifest, edit,
|
|
347
|
-
&max_sequence);
|
|
348
|
-
if (!s.ok()) {
|
|
349
|
-
return s;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
// The previous incarnation may not have written any MANIFEST
|
|
353
|
-
// records after allocating this log number. So we manually
|
|
354
|
-
// update the file number allocation counter in VersionSet.
|
|
355
|
-
versions_->MarkFileNumberUsed(logs[i]);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
if (versions_->LastSequence() < max_sequence) {
|
|
359
|
-
versions_->SetLastSequence(max_sequence);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
return Status::OK();
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
Status DBImpl::RecoverLogFile(uint64_t log_number, bool last_log,
|
|
366
|
-
bool* save_manifest, VersionEdit* edit,
|
|
367
|
-
SequenceNumber* max_sequence) {
|
|
368
|
-
struct LogReporter : public log::Reader::Reporter {
|
|
369
|
-
Env* env;
|
|
370
|
-
Logger* info_log;
|
|
371
|
-
const char* fname;
|
|
372
|
-
Status* status; // NULL if options_.paranoid_checks==false
|
|
373
|
-
virtual void Corruption(size_t bytes, const Status& s) {
|
|
374
|
-
Log(info_log, "%s%s: dropping %d bytes; %s",
|
|
375
|
-
(this->status == NULL ? "(ignoring error) " : ""),
|
|
376
|
-
fname, static_cast<int>(bytes), s.ToString().c_str());
|
|
377
|
-
if (this->status != NULL && this->status->ok()) *this->status = s;
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
mutex_.AssertHeld();
|
|
382
|
-
|
|
383
|
-
// Open the log file
|
|
384
|
-
std::string fname = LogFileName(dbname_, log_number);
|
|
385
|
-
SequentialFile* file;
|
|
386
|
-
Status status = env_->NewSequentialFile(fname, &file);
|
|
387
|
-
if (!status.ok()) {
|
|
388
|
-
MaybeIgnoreError(&status);
|
|
389
|
-
return status;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
// Create the log reader.
|
|
393
|
-
LogReporter reporter;
|
|
394
|
-
reporter.env = env_;
|
|
395
|
-
reporter.info_log = options_.info_log;
|
|
396
|
-
reporter.fname = fname.c_str();
|
|
397
|
-
reporter.status = (options_.paranoid_checks ? &status : NULL);
|
|
398
|
-
// We intentionally make log::Reader do checksumming even if
|
|
399
|
-
// paranoid_checks==false so that corruptions cause entire commits
|
|
400
|
-
// to be skipped instead of propagating bad information (like overly
|
|
401
|
-
// large sequence numbers).
|
|
402
|
-
log::Reader reader(file, &reporter, true/*checksum*/,
|
|
403
|
-
0/*initial_offset*/);
|
|
404
|
-
Log(options_.info_log, "Recovering log #%llu",
|
|
405
|
-
(unsigned long long) log_number);
|
|
406
|
-
|
|
407
|
-
// Read all the records and add to a memtable
|
|
408
|
-
std::string scratch;
|
|
409
|
-
Slice record;
|
|
410
|
-
WriteBatch batch;
|
|
411
|
-
int compactions = 0;
|
|
412
|
-
MemTable* mem = NULL;
|
|
413
|
-
while (reader.ReadRecord(&record, &scratch) &&
|
|
414
|
-
status.ok()) {
|
|
415
|
-
if (record.size() < 12) {
|
|
416
|
-
reporter.Corruption(
|
|
417
|
-
record.size(), Status::Corruption("log record too small"));
|
|
418
|
-
continue;
|
|
419
|
-
}
|
|
420
|
-
WriteBatchInternal::SetContents(&batch, record);
|
|
421
|
-
|
|
422
|
-
if (mem == NULL) {
|
|
423
|
-
mem = new MemTable(internal_comparator_);
|
|
424
|
-
mem->Ref();
|
|
425
|
-
}
|
|
426
|
-
status = WriteBatchInternal::InsertInto(&batch, mem);
|
|
427
|
-
MaybeIgnoreError(&status);
|
|
428
|
-
if (!status.ok()) {
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
const SequenceNumber last_seq =
|
|
432
|
-
WriteBatchInternal::Sequence(&batch) +
|
|
433
|
-
WriteBatchInternal::Count(&batch) - 1;
|
|
434
|
-
if (last_seq > *max_sequence) {
|
|
435
|
-
*max_sequence = last_seq;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
if (mem->ApproximateMemoryUsage() > options_.write_buffer_size) {
|
|
439
|
-
compactions++;
|
|
440
|
-
*save_manifest = true;
|
|
441
|
-
status = WriteLevel0Table(mem, edit, NULL);
|
|
442
|
-
mem->Unref();
|
|
443
|
-
mem = NULL;
|
|
444
|
-
if (!status.ok()) {
|
|
445
|
-
// Reflect errors immediately so that conditions like full
|
|
446
|
-
// file-systems cause the DB::Open() to fail.
|
|
447
|
-
break;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
delete file;
|
|
453
|
-
|
|
454
|
-
// See if we should keep reusing the last log file.
|
|
455
|
-
if (status.ok() && options_.reuse_logs && last_log && compactions == 0) {
|
|
456
|
-
assert(logfile_ == NULL);
|
|
457
|
-
assert(log_ == NULL);
|
|
458
|
-
assert(mem_ == NULL);
|
|
459
|
-
uint64_t lfile_size;
|
|
460
|
-
if (env_->GetFileSize(fname, &lfile_size).ok() &&
|
|
461
|
-
env_->NewAppendableFile(fname, &logfile_).ok()) {
|
|
462
|
-
Log(options_.info_log, "Reusing old log %s \n", fname.c_str());
|
|
463
|
-
log_ = new log::Writer(logfile_, lfile_size);
|
|
464
|
-
logfile_number_ = log_number;
|
|
465
|
-
if (mem != NULL) {
|
|
466
|
-
mem_ = mem;
|
|
467
|
-
mem = NULL;
|
|
468
|
-
} else {
|
|
469
|
-
// mem can be NULL if lognum exists but was empty.
|
|
470
|
-
mem_ = new MemTable(internal_comparator_);
|
|
471
|
-
mem_->Ref();
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
if (mem != NULL) {
|
|
477
|
-
// mem did not get reused; compact it.
|
|
478
|
-
if (status.ok()) {
|
|
479
|
-
*save_manifest = true;
|
|
480
|
-
status = WriteLevel0Table(mem, edit, NULL);
|
|
481
|
-
}
|
|
482
|
-
mem->Unref();
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
return status;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
Status DBImpl::WriteLevel0Table(MemTable* mem, VersionEdit* edit,
|
|
489
|
-
Version* base) {
|
|
490
|
-
mutex_.AssertHeld();
|
|
491
|
-
const uint64_t start_micros = env_->NowMicros();
|
|
492
|
-
FileMetaData meta;
|
|
493
|
-
meta.number = versions_->NewFileNumber();
|
|
494
|
-
pending_outputs_.insert(meta.number);
|
|
495
|
-
Iterator* iter = mem->NewIterator();
|
|
496
|
-
Log(options_.info_log, "Level-0 table #%llu: started",
|
|
497
|
-
(unsigned long long) meta.number);
|
|
498
|
-
|
|
499
|
-
Status s;
|
|
500
|
-
{
|
|
501
|
-
mutex_.Unlock();
|
|
502
|
-
s = BuildTable(dbname_, env_, options_, table_cache_, iter, &meta);
|
|
503
|
-
mutex_.Lock();
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
Log(options_.info_log, "Level-0 table #%llu: %lld bytes %s",
|
|
507
|
-
(unsigned long long) meta.number,
|
|
508
|
-
(unsigned long long) meta.file_size,
|
|
509
|
-
s.ToString().c_str());
|
|
510
|
-
delete iter;
|
|
511
|
-
pending_outputs_.erase(meta.number);
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
// Note that if file_size is zero, the file has been deleted and
|
|
515
|
-
// should not be added to the manifest.
|
|
516
|
-
int level = 0;
|
|
517
|
-
if (s.ok() && meta.file_size > 0) {
|
|
518
|
-
const Slice min_user_key = meta.smallest.user_key();
|
|
519
|
-
const Slice max_user_key = meta.largest.user_key();
|
|
520
|
-
if (base != NULL) {
|
|
521
|
-
level = base->PickLevelForMemTableOutput(min_user_key, max_user_key);
|
|
522
|
-
}
|
|
523
|
-
edit->AddFile(level, meta.number, meta.file_size,
|
|
524
|
-
meta.smallest, meta.largest);
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
CompactionStats stats;
|
|
528
|
-
stats.micros = env_->NowMicros() - start_micros;
|
|
529
|
-
stats.bytes_written = meta.file_size;
|
|
530
|
-
stats_[level].Add(stats);
|
|
531
|
-
return s;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
void DBImpl::CompactMemTable() {
|
|
535
|
-
mutex_.AssertHeld();
|
|
536
|
-
assert(imm_ != NULL);
|
|
537
|
-
|
|
538
|
-
// Save the contents of the memtable as a new Table
|
|
539
|
-
VersionEdit edit;
|
|
540
|
-
Version* base = versions_->current();
|
|
541
|
-
base->Ref();
|
|
542
|
-
Status s = WriteLevel0Table(imm_, &edit, base);
|
|
543
|
-
base->Unref();
|
|
544
|
-
|
|
545
|
-
if (s.ok() && shutting_down_.Acquire_Load()) {
|
|
546
|
-
s = Status::IOError("Deleting DB during memtable compaction");
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
// Replace immutable memtable with the generated Table
|
|
550
|
-
if (s.ok()) {
|
|
551
|
-
edit.SetPrevLogNumber(0);
|
|
552
|
-
edit.SetLogNumber(logfile_number_); // Earlier logs no longer needed
|
|
553
|
-
s = versions_->LogAndApply(&edit, &mutex_);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
if (s.ok()) {
|
|
557
|
-
// Commit to the new state
|
|
558
|
-
imm_->Unref();
|
|
559
|
-
imm_ = NULL;
|
|
560
|
-
has_imm_.Release_Store(NULL);
|
|
561
|
-
DeleteObsoleteFiles();
|
|
562
|
-
} else {
|
|
563
|
-
RecordBackgroundError(s);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
void DBImpl::CompactRange(const Slice* begin, const Slice* end) {
|
|
568
|
-
int max_level_with_files = 1;
|
|
569
|
-
{
|
|
570
|
-
MutexLock l(&mutex_);
|
|
571
|
-
Version* base = versions_->current();
|
|
572
|
-
for (int level = 1; level < config::kNumLevels; level++) {
|
|
573
|
-
if (base->OverlapInLevel(level, begin, end)) {
|
|
574
|
-
max_level_with_files = level;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
TEST_CompactMemTable(); // TODO(sanjay): Skip if memtable does not overlap
|
|
579
|
-
for (int level = 0; level < max_level_with_files; level++) {
|
|
580
|
-
TEST_CompactRange(level, begin, end);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
void DBImpl::TEST_CompactRange(int level, const Slice* begin,const Slice* end) {
|
|
585
|
-
assert(level >= 0);
|
|
586
|
-
assert(level + 1 < config::kNumLevels);
|
|
587
|
-
|
|
588
|
-
InternalKey begin_storage, end_storage;
|
|
589
|
-
|
|
590
|
-
ManualCompaction manual;
|
|
591
|
-
manual.level = level;
|
|
592
|
-
manual.done = false;
|
|
593
|
-
if (begin == NULL) {
|
|
594
|
-
manual.begin = NULL;
|
|
595
|
-
} else {
|
|
596
|
-
begin_storage = InternalKey(*begin, kMaxSequenceNumber, kValueTypeForSeek);
|
|
597
|
-
manual.begin = &begin_storage;
|
|
598
|
-
}
|
|
599
|
-
if (end == NULL) {
|
|
600
|
-
manual.end = NULL;
|
|
601
|
-
} else {
|
|
602
|
-
end_storage = InternalKey(*end, 0, static_cast<ValueType>(0));
|
|
603
|
-
manual.end = &end_storage;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
MutexLock l(&mutex_);
|
|
607
|
-
while (!manual.done && !shutting_down_.Acquire_Load() && bg_error_.ok()) {
|
|
608
|
-
if (manual_compaction_ == NULL) { // Idle
|
|
609
|
-
manual_compaction_ = &manual;
|
|
610
|
-
MaybeScheduleCompaction();
|
|
611
|
-
} else { // Running either my compaction or another compaction.
|
|
612
|
-
bg_cv_.Wait();
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
if (manual_compaction_ == &manual) {
|
|
616
|
-
// Cancel my manual compaction since we aborted early for some reason.
|
|
617
|
-
manual_compaction_ = NULL;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
Status DBImpl::TEST_CompactMemTable() {
|
|
622
|
-
// NULL batch means just wait for earlier writes to be done
|
|
623
|
-
Status s = Write(WriteOptions(), NULL);
|
|
624
|
-
if (s.ok()) {
|
|
625
|
-
// Wait until the compaction completes
|
|
626
|
-
MutexLock l(&mutex_);
|
|
627
|
-
while (imm_ != NULL && bg_error_.ok()) {
|
|
628
|
-
bg_cv_.Wait();
|
|
629
|
-
}
|
|
630
|
-
if (imm_ != NULL) {
|
|
631
|
-
s = bg_error_;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
return s;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
void DBImpl::RecordBackgroundError(const Status& s) {
|
|
638
|
-
mutex_.AssertHeld();
|
|
639
|
-
if (bg_error_.ok()) {
|
|
640
|
-
bg_error_ = s;
|
|
641
|
-
bg_cv_.SignalAll();
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
void DBImpl::MaybeScheduleCompaction() {
|
|
646
|
-
mutex_.AssertHeld();
|
|
647
|
-
if (bg_compaction_scheduled_) {
|
|
648
|
-
// Already scheduled
|
|
649
|
-
} else if (shutting_down_.Acquire_Load()) {
|
|
650
|
-
// DB is being deleted; no more background compactions
|
|
651
|
-
} else if (!bg_error_.ok()) {
|
|
652
|
-
// Already got an error; no more changes
|
|
653
|
-
} else if (imm_ == NULL &&
|
|
654
|
-
manual_compaction_ == NULL &&
|
|
655
|
-
!versions_->NeedsCompaction()) {
|
|
656
|
-
// No work to be done
|
|
657
|
-
} else {
|
|
658
|
-
bg_compaction_scheduled_ = true;
|
|
659
|
-
env_->Schedule(&DBImpl::BGWork, this);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
void DBImpl::BGWork(void* db) {
|
|
664
|
-
reinterpret_cast<DBImpl*>(db)->BackgroundCall();
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
void DBImpl::BackgroundCall() {
|
|
668
|
-
MutexLock l(&mutex_);
|
|
669
|
-
assert(bg_compaction_scheduled_);
|
|
670
|
-
if (shutting_down_.Acquire_Load()) {
|
|
671
|
-
// No more background work when shutting down.
|
|
672
|
-
} else if (!bg_error_.ok()) {
|
|
673
|
-
// No more background work after a background error.
|
|
674
|
-
} else {
|
|
675
|
-
BackgroundCompaction();
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
bg_compaction_scheduled_ = false;
|
|
679
|
-
|
|
680
|
-
// Previous compaction may have produced too many files in a level,
|
|
681
|
-
// so reschedule another compaction if needed.
|
|
682
|
-
MaybeScheduleCompaction();
|
|
683
|
-
bg_cv_.SignalAll();
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
void DBImpl::BackgroundCompaction() {
|
|
687
|
-
mutex_.AssertHeld();
|
|
688
|
-
|
|
689
|
-
if (imm_ != NULL) {
|
|
690
|
-
CompactMemTable();
|
|
691
|
-
return;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
Compaction* c;
|
|
695
|
-
bool is_manual = (manual_compaction_ != NULL);
|
|
696
|
-
InternalKey manual_end;
|
|
697
|
-
if (is_manual) {
|
|
698
|
-
ManualCompaction* m = manual_compaction_;
|
|
699
|
-
c = versions_->CompactRange(m->level, m->begin, m->end);
|
|
700
|
-
m->done = (c == NULL);
|
|
701
|
-
if (c != NULL) {
|
|
702
|
-
manual_end = c->input(0, c->num_input_files(0) - 1)->largest;
|
|
703
|
-
}
|
|
704
|
-
Log(options_.info_log,
|
|
705
|
-
"Manual compaction at level-%d from %s .. %s; will stop at %s\n",
|
|
706
|
-
m->level,
|
|
707
|
-
(m->begin ? m->begin->DebugString().c_str() : "(begin)"),
|
|
708
|
-
(m->end ? m->end->DebugString().c_str() : "(end)"),
|
|
709
|
-
(m->done ? "(end)" : manual_end.DebugString().c_str()));
|
|
710
|
-
} else {
|
|
711
|
-
c = versions_->PickCompaction();
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
Status status;
|
|
715
|
-
if (c == NULL) {
|
|
716
|
-
// Nothing to do
|
|
717
|
-
} else if (!is_manual && c->IsTrivialMove()) {
|
|
718
|
-
// Move file to next level
|
|
719
|
-
assert(c->num_input_files(0) == 1);
|
|
720
|
-
FileMetaData* f = c->input(0, 0);
|
|
721
|
-
c->edit()->DeleteFile(c->level(), f->number);
|
|
722
|
-
c->edit()->AddFile(c->level() + 1, f->number, f->file_size,
|
|
723
|
-
f->smallest, f->largest);
|
|
724
|
-
status = versions_->LogAndApply(c->edit(), &mutex_);
|
|
725
|
-
if (!status.ok()) {
|
|
726
|
-
RecordBackgroundError(status);
|
|
727
|
-
}
|
|
728
|
-
VersionSet::LevelSummaryStorage tmp;
|
|
729
|
-
Log(options_.info_log, "Moved #%lld to level-%d %lld bytes %s: %s\n",
|
|
730
|
-
static_cast<unsigned long long>(f->number),
|
|
731
|
-
c->level() + 1,
|
|
732
|
-
static_cast<unsigned long long>(f->file_size),
|
|
733
|
-
status.ToString().c_str(),
|
|
734
|
-
versions_->LevelSummary(&tmp));
|
|
735
|
-
} else {
|
|
736
|
-
CompactionState* compact = new CompactionState(c);
|
|
737
|
-
status = DoCompactionWork(compact);
|
|
738
|
-
if (!status.ok()) {
|
|
739
|
-
RecordBackgroundError(status);
|
|
740
|
-
}
|
|
741
|
-
CleanupCompaction(compact);
|
|
742
|
-
c->ReleaseInputs();
|
|
743
|
-
DeleteObsoleteFiles();
|
|
744
|
-
}
|
|
745
|
-
delete c;
|
|
746
|
-
|
|
747
|
-
if (status.ok()) {
|
|
748
|
-
// Done
|
|
749
|
-
} else if (shutting_down_.Acquire_Load()) {
|
|
750
|
-
// Ignore compaction errors found during shutting down
|
|
751
|
-
} else {
|
|
752
|
-
Log(options_.info_log,
|
|
753
|
-
"Compaction error: %s", status.ToString().c_str());
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
if (is_manual) {
|
|
757
|
-
ManualCompaction* m = manual_compaction_;
|
|
758
|
-
if (!status.ok()) {
|
|
759
|
-
m->done = true;
|
|
760
|
-
}
|
|
761
|
-
if (!m->done) {
|
|
762
|
-
// We only compacted part of the requested range. Update *m
|
|
763
|
-
// to the range that is left to be compacted.
|
|
764
|
-
m->tmp_storage = manual_end;
|
|
765
|
-
m->begin = &m->tmp_storage;
|
|
766
|
-
}
|
|
767
|
-
manual_compaction_ = NULL;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
void DBImpl::CleanupCompaction(CompactionState* compact) {
|
|
772
|
-
mutex_.AssertHeld();
|
|
773
|
-
if (compact->builder != NULL) {
|
|
774
|
-
// May happen if we get a shutdown call in the middle of compaction
|
|
775
|
-
compact->builder->Abandon();
|
|
776
|
-
delete compact->builder;
|
|
777
|
-
} else {
|
|
778
|
-
assert(compact->outfile == NULL);
|
|
779
|
-
}
|
|
780
|
-
delete compact->outfile;
|
|
781
|
-
for (size_t i = 0; i < compact->outputs.size(); i++) {
|
|
782
|
-
const CompactionState::Output& out = compact->outputs[i];
|
|
783
|
-
pending_outputs_.erase(out.number);
|
|
784
|
-
}
|
|
785
|
-
delete compact;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
Status DBImpl::OpenCompactionOutputFile(CompactionState* compact) {
|
|
789
|
-
assert(compact != NULL);
|
|
790
|
-
assert(compact->builder == NULL);
|
|
791
|
-
uint64_t file_number;
|
|
792
|
-
{
|
|
793
|
-
mutex_.Lock();
|
|
794
|
-
file_number = versions_->NewFileNumber();
|
|
795
|
-
pending_outputs_.insert(file_number);
|
|
796
|
-
CompactionState::Output out;
|
|
797
|
-
out.number = file_number;
|
|
798
|
-
out.smallest.Clear();
|
|
799
|
-
out.largest.Clear();
|
|
800
|
-
compact->outputs.push_back(out);
|
|
801
|
-
mutex_.Unlock();
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
// Make the output file
|
|
805
|
-
std::string fname = TableFileName(dbname_, file_number);
|
|
806
|
-
Status s = env_->NewWritableFile(fname, &compact->outfile);
|
|
807
|
-
if (s.ok()) {
|
|
808
|
-
compact->builder = new TableBuilder(options_, compact->outfile);
|
|
809
|
-
}
|
|
810
|
-
return s;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
Status DBImpl::FinishCompactionOutputFile(CompactionState* compact,
|
|
814
|
-
Iterator* input) {
|
|
815
|
-
assert(compact != NULL);
|
|
816
|
-
assert(compact->outfile != NULL);
|
|
817
|
-
assert(compact->builder != NULL);
|
|
818
|
-
|
|
819
|
-
const uint64_t output_number = compact->current_output()->number;
|
|
820
|
-
assert(output_number != 0);
|
|
821
|
-
|
|
822
|
-
// Check for iterator errors
|
|
823
|
-
Status s = input->status();
|
|
824
|
-
const uint64_t current_entries = compact->builder->NumEntries();
|
|
825
|
-
if (s.ok()) {
|
|
826
|
-
s = compact->builder->Finish();
|
|
827
|
-
} else {
|
|
828
|
-
compact->builder->Abandon();
|
|
829
|
-
}
|
|
830
|
-
const uint64_t current_bytes = compact->builder->FileSize();
|
|
831
|
-
compact->current_output()->file_size = current_bytes;
|
|
832
|
-
compact->total_bytes += current_bytes;
|
|
833
|
-
delete compact->builder;
|
|
834
|
-
compact->builder = NULL;
|
|
835
|
-
|
|
836
|
-
// Finish and check for file errors
|
|
837
|
-
if (s.ok()) {
|
|
838
|
-
s = compact->outfile->Sync();
|
|
839
|
-
}
|
|
840
|
-
if (s.ok()) {
|
|
841
|
-
s = compact->outfile->Close();
|
|
842
|
-
}
|
|
843
|
-
delete compact->outfile;
|
|
844
|
-
compact->outfile = NULL;
|
|
845
|
-
|
|
846
|
-
if (s.ok() && current_entries > 0) {
|
|
847
|
-
// Verify that the table is usable
|
|
848
|
-
Iterator* iter = table_cache_->NewIterator(ReadOptions(),
|
|
849
|
-
output_number,
|
|
850
|
-
current_bytes);
|
|
851
|
-
s = iter->status();
|
|
852
|
-
delete iter;
|
|
853
|
-
if (s.ok()) {
|
|
854
|
-
Log(options_.info_log,
|
|
855
|
-
"Generated table #%llu@%d: %lld keys, %lld bytes",
|
|
856
|
-
(unsigned long long) output_number,
|
|
857
|
-
compact->compaction->level(),
|
|
858
|
-
(unsigned long long) current_entries,
|
|
859
|
-
(unsigned long long) current_bytes);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
return s;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
Status DBImpl::InstallCompactionResults(CompactionState* compact) {
|
|
867
|
-
mutex_.AssertHeld();
|
|
868
|
-
Log(options_.info_log, "Compacted %d@%d + %d@%d files => %lld bytes",
|
|
869
|
-
compact->compaction->num_input_files(0),
|
|
870
|
-
compact->compaction->level(),
|
|
871
|
-
compact->compaction->num_input_files(1),
|
|
872
|
-
compact->compaction->level() + 1,
|
|
873
|
-
static_cast<long long>(compact->total_bytes));
|
|
874
|
-
|
|
875
|
-
// Add compaction outputs
|
|
876
|
-
compact->compaction->AddInputDeletions(compact->compaction->edit());
|
|
877
|
-
const int level = compact->compaction->level();
|
|
878
|
-
for (size_t i = 0; i < compact->outputs.size(); i++) {
|
|
879
|
-
const CompactionState::Output& out = compact->outputs[i];
|
|
880
|
-
compact->compaction->edit()->AddFile(
|
|
881
|
-
level + 1,
|
|
882
|
-
out.number, out.file_size, out.smallest, out.largest);
|
|
883
|
-
}
|
|
884
|
-
return versions_->LogAndApply(compact->compaction->edit(), &mutex_);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
Status DBImpl::DoCompactionWork(CompactionState* compact) {
|
|
888
|
-
const uint64_t start_micros = env_->NowMicros();
|
|
889
|
-
int64_t imm_micros = 0; // Micros spent doing imm_ compactions
|
|
890
|
-
|
|
891
|
-
Log(options_.info_log, "Compacting %d@%d + %d@%d files",
|
|
892
|
-
compact->compaction->num_input_files(0),
|
|
893
|
-
compact->compaction->level(),
|
|
894
|
-
compact->compaction->num_input_files(1),
|
|
895
|
-
compact->compaction->level() + 1);
|
|
896
|
-
|
|
897
|
-
assert(versions_->NumLevelFiles(compact->compaction->level()) > 0);
|
|
898
|
-
assert(compact->builder == NULL);
|
|
899
|
-
assert(compact->outfile == NULL);
|
|
900
|
-
if (snapshots_.empty()) {
|
|
901
|
-
compact->smallest_snapshot = versions_->LastSequence();
|
|
902
|
-
} else {
|
|
903
|
-
compact->smallest_snapshot = snapshots_.oldest()->number_;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
// Release mutex while we're actually doing the compaction work
|
|
907
|
-
mutex_.Unlock();
|
|
908
|
-
|
|
909
|
-
Iterator* input = versions_->MakeInputIterator(compact->compaction);
|
|
910
|
-
input->SeekToFirst();
|
|
911
|
-
Status status;
|
|
912
|
-
ParsedInternalKey ikey;
|
|
913
|
-
std::string current_user_key;
|
|
914
|
-
bool has_current_user_key = false;
|
|
915
|
-
SequenceNumber last_sequence_for_key = kMaxSequenceNumber;
|
|
916
|
-
for (; input->Valid() && !shutting_down_.Acquire_Load(); ) {
|
|
917
|
-
// Prioritize immutable compaction work
|
|
918
|
-
if (has_imm_.NoBarrier_Load() != NULL) {
|
|
919
|
-
const uint64_t imm_start = env_->NowMicros();
|
|
920
|
-
mutex_.Lock();
|
|
921
|
-
if (imm_ != NULL) {
|
|
922
|
-
CompactMemTable();
|
|
923
|
-
bg_cv_.SignalAll(); // Wakeup MakeRoomForWrite() if necessary
|
|
924
|
-
}
|
|
925
|
-
mutex_.Unlock();
|
|
926
|
-
imm_micros += (env_->NowMicros() - imm_start);
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
Slice key = input->key();
|
|
930
|
-
if (compact->compaction->ShouldStopBefore(key) &&
|
|
931
|
-
compact->builder != NULL) {
|
|
932
|
-
status = FinishCompactionOutputFile(compact, input);
|
|
933
|
-
if (!status.ok()) {
|
|
934
|
-
break;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
// Handle key/value, add to state, etc.
|
|
939
|
-
bool drop = false;
|
|
940
|
-
if (!ParseInternalKey(key, &ikey)) {
|
|
941
|
-
// Do not hide error keys
|
|
942
|
-
current_user_key.clear();
|
|
943
|
-
has_current_user_key = false;
|
|
944
|
-
last_sequence_for_key = kMaxSequenceNumber;
|
|
945
|
-
} else {
|
|
946
|
-
if (!has_current_user_key ||
|
|
947
|
-
user_comparator()->Compare(ikey.user_key,
|
|
948
|
-
Slice(current_user_key)) != 0) {
|
|
949
|
-
// First occurrence of this user key
|
|
950
|
-
current_user_key.assign(ikey.user_key.data(), ikey.user_key.size());
|
|
951
|
-
has_current_user_key = true;
|
|
952
|
-
last_sequence_for_key = kMaxSequenceNumber;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
if (last_sequence_for_key <= compact->smallest_snapshot) {
|
|
956
|
-
// Hidden by an newer entry for same user key
|
|
957
|
-
drop = true; // (A)
|
|
958
|
-
} else if (ikey.type == kTypeDeletion &&
|
|
959
|
-
ikey.sequence <= compact->smallest_snapshot &&
|
|
960
|
-
compact->compaction->IsBaseLevelForKey(ikey.user_key)) {
|
|
961
|
-
// For this user key:
|
|
962
|
-
// (1) there is no data in higher levels
|
|
963
|
-
// (2) data in lower levels will have larger sequence numbers
|
|
964
|
-
// (3) data in layers that are being compacted here and have
|
|
965
|
-
// smaller sequence numbers will be dropped in the next
|
|
966
|
-
// few iterations of this loop (by rule (A) above).
|
|
967
|
-
// Therefore this deletion marker is obsolete and can be dropped.
|
|
968
|
-
drop = true;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
last_sequence_for_key = ikey.sequence;
|
|
972
|
-
}
|
|
973
|
-
#if 0
|
|
974
|
-
Log(options_.info_log,
|
|
975
|
-
" Compact: %s, seq %d, type: %d %d, drop: %d, is_base: %d, "
|
|
976
|
-
"%d smallest_snapshot: %d",
|
|
977
|
-
ikey.user_key.ToString().c_str(),
|
|
978
|
-
(int)ikey.sequence, ikey.type, kTypeValue, drop,
|
|
979
|
-
compact->compaction->IsBaseLevelForKey(ikey.user_key),
|
|
980
|
-
(int)last_sequence_for_key, (int)compact->smallest_snapshot);
|
|
981
|
-
#endif
|
|
982
|
-
|
|
983
|
-
if (!drop) {
|
|
984
|
-
// Open output file if necessary
|
|
985
|
-
if (compact->builder == NULL) {
|
|
986
|
-
status = OpenCompactionOutputFile(compact);
|
|
987
|
-
if (!status.ok()) {
|
|
988
|
-
break;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
if (compact->builder->NumEntries() == 0) {
|
|
992
|
-
compact->current_output()->smallest.DecodeFrom(key);
|
|
993
|
-
}
|
|
994
|
-
compact->current_output()->largest.DecodeFrom(key);
|
|
995
|
-
compact->builder->Add(key, input->value());
|
|
996
|
-
|
|
997
|
-
// Close output file if it is big enough
|
|
998
|
-
if (compact->builder->FileSize() >=
|
|
999
|
-
compact->compaction->MaxOutputFileSize()) {
|
|
1000
|
-
status = FinishCompactionOutputFile(compact, input);
|
|
1001
|
-
if (!status.ok()) {
|
|
1002
|
-
break;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
input->Next();
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
if (status.ok() && shutting_down_.Acquire_Load()) {
|
|
1011
|
-
status = Status::IOError("Deleting DB during compaction");
|
|
1012
|
-
}
|
|
1013
|
-
if (status.ok() && compact->builder != NULL) {
|
|
1014
|
-
status = FinishCompactionOutputFile(compact, input);
|
|
1015
|
-
}
|
|
1016
|
-
if (status.ok()) {
|
|
1017
|
-
status = input->status();
|
|
1018
|
-
}
|
|
1019
|
-
delete input;
|
|
1020
|
-
input = NULL;
|
|
1021
|
-
|
|
1022
|
-
CompactionStats stats;
|
|
1023
|
-
stats.micros = env_->NowMicros() - start_micros - imm_micros;
|
|
1024
|
-
for (int which = 0; which < 2; which++) {
|
|
1025
|
-
for (int i = 0; i < compact->compaction->num_input_files(which); i++) {
|
|
1026
|
-
stats.bytes_read += compact->compaction->input(which, i)->file_size;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
for (size_t i = 0; i < compact->outputs.size(); i++) {
|
|
1030
|
-
stats.bytes_written += compact->outputs[i].file_size;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
mutex_.Lock();
|
|
1034
|
-
stats_[compact->compaction->level() + 1].Add(stats);
|
|
1035
|
-
|
|
1036
|
-
if (status.ok()) {
|
|
1037
|
-
status = InstallCompactionResults(compact);
|
|
1038
|
-
}
|
|
1039
|
-
if (!status.ok()) {
|
|
1040
|
-
RecordBackgroundError(status);
|
|
1041
|
-
}
|
|
1042
|
-
VersionSet::LevelSummaryStorage tmp;
|
|
1043
|
-
Log(options_.info_log,
|
|
1044
|
-
"compacted to: %s", versions_->LevelSummary(&tmp));
|
|
1045
|
-
return status;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
namespace {
|
|
1049
|
-
struct IterState {
|
|
1050
|
-
port::Mutex* mu;
|
|
1051
|
-
Version* version;
|
|
1052
|
-
MemTable* mem;
|
|
1053
|
-
MemTable* imm;
|
|
1054
|
-
};
|
|
1055
|
-
|
|
1056
|
-
static void CleanupIteratorState(void* arg1, void* arg2) {
|
|
1057
|
-
IterState* state = reinterpret_cast<IterState*>(arg1);
|
|
1058
|
-
state->mu->Lock();
|
|
1059
|
-
state->mem->Unref();
|
|
1060
|
-
if (state->imm != NULL) state->imm->Unref();
|
|
1061
|
-
state->version->Unref();
|
|
1062
|
-
state->mu->Unlock();
|
|
1063
|
-
delete state;
|
|
1064
|
-
}
|
|
1065
|
-
} // namespace
|
|
1066
|
-
|
|
1067
|
-
Iterator* DBImpl::NewInternalIterator(const ReadOptions& options,
|
|
1068
|
-
SequenceNumber* latest_snapshot,
|
|
1069
|
-
uint32_t* seed) {
|
|
1070
|
-
IterState* cleanup = new IterState;
|
|
1071
|
-
mutex_.Lock();
|
|
1072
|
-
*latest_snapshot = versions_->LastSequence();
|
|
1073
|
-
|
|
1074
|
-
// Collect together all needed child iterators
|
|
1075
|
-
std::vector<Iterator*> list;
|
|
1076
|
-
list.push_back(mem_->NewIterator());
|
|
1077
|
-
mem_->Ref();
|
|
1078
|
-
if (imm_ != NULL) {
|
|
1079
|
-
list.push_back(imm_->NewIterator());
|
|
1080
|
-
imm_->Ref();
|
|
1081
|
-
}
|
|
1082
|
-
versions_->current()->AddIterators(options, &list);
|
|
1083
|
-
Iterator* internal_iter =
|
|
1084
|
-
NewMergingIterator(&internal_comparator_, &list[0], list.size());
|
|
1085
|
-
versions_->current()->Ref();
|
|
1086
|
-
|
|
1087
|
-
cleanup->mu = &mutex_;
|
|
1088
|
-
cleanup->mem = mem_;
|
|
1089
|
-
cleanup->imm = imm_;
|
|
1090
|
-
cleanup->version = versions_->current();
|
|
1091
|
-
internal_iter->RegisterCleanup(CleanupIteratorState, cleanup, NULL);
|
|
1092
|
-
|
|
1093
|
-
*seed = ++seed_;
|
|
1094
|
-
mutex_.Unlock();
|
|
1095
|
-
return internal_iter;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
Iterator* DBImpl::TEST_NewInternalIterator() {
|
|
1099
|
-
SequenceNumber ignored;
|
|
1100
|
-
uint32_t ignored_seed;
|
|
1101
|
-
return NewInternalIterator(ReadOptions(), &ignored, &ignored_seed);
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
int64_t DBImpl::TEST_MaxNextLevelOverlappingBytes() {
|
|
1105
|
-
MutexLock l(&mutex_);
|
|
1106
|
-
return versions_->MaxNextLevelOverlappingBytes();
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
Status DBImpl::Get(const ReadOptions& options,
|
|
1110
|
-
const Slice& key,
|
|
1111
|
-
std::string* value) {
|
|
1112
|
-
Status s;
|
|
1113
|
-
MutexLock l(&mutex_);
|
|
1114
|
-
SequenceNumber snapshot;
|
|
1115
|
-
if (options.snapshot != NULL) {
|
|
1116
|
-
snapshot = reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_;
|
|
1117
|
-
} else {
|
|
1118
|
-
snapshot = versions_->LastSequence();
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
MemTable* mem = mem_;
|
|
1122
|
-
MemTable* imm = imm_;
|
|
1123
|
-
Version* current = versions_->current();
|
|
1124
|
-
mem->Ref();
|
|
1125
|
-
if (imm != NULL) imm->Ref();
|
|
1126
|
-
current->Ref();
|
|
1127
|
-
|
|
1128
|
-
bool have_stat_update = false;
|
|
1129
|
-
Version::GetStats stats;
|
|
1130
|
-
|
|
1131
|
-
// Unlock while reading from files and memtables
|
|
1132
|
-
{
|
|
1133
|
-
mutex_.Unlock();
|
|
1134
|
-
// First look in the memtable, then in the immutable memtable (if any).
|
|
1135
|
-
LookupKey lkey(key, snapshot);
|
|
1136
|
-
if (mem->Get(lkey, value, &s)) {
|
|
1137
|
-
// Done
|
|
1138
|
-
} else if (imm != NULL && imm->Get(lkey, value, &s)) {
|
|
1139
|
-
// Done
|
|
1140
|
-
} else {
|
|
1141
|
-
s = current->Get(options, lkey, value, &stats);
|
|
1142
|
-
have_stat_update = true;
|
|
1143
|
-
}
|
|
1144
|
-
mutex_.Lock();
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
if (have_stat_update && current->UpdateStats(stats)) {
|
|
1148
|
-
MaybeScheduleCompaction();
|
|
1149
|
-
}
|
|
1150
|
-
mem->Unref();
|
|
1151
|
-
if (imm != NULL) imm->Unref();
|
|
1152
|
-
current->Unref();
|
|
1153
|
-
return s;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
Iterator* DBImpl::NewIterator(const ReadOptions& options) {
|
|
1157
|
-
SequenceNumber latest_snapshot;
|
|
1158
|
-
uint32_t seed;
|
|
1159
|
-
Iterator* iter = NewInternalIterator(options, &latest_snapshot, &seed);
|
|
1160
|
-
return NewDBIterator(
|
|
1161
|
-
this, user_comparator(), iter,
|
|
1162
|
-
(options.snapshot != NULL
|
|
1163
|
-
? reinterpret_cast<const SnapshotImpl*>(options.snapshot)->number_
|
|
1164
|
-
: latest_snapshot),
|
|
1165
|
-
seed);
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
void DBImpl::RecordReadSample(Slice key) {
|
|
1169
|
-
MutexLock l(&mutex_);
|
|
1170
|
-
if (versions_->current()->RecordReadSample(key)) {
|
|
1171
|
-
MaybeScheduleCompaction();
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
const Snapshot* DBImpl::GetSnapshot() {
|
|
1176
|
-
MutexLock l(&mutex_);
|
|
1177
|
-
return snapshots_.New(versions_->LastSequence());
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
void DBImpl::ReleaseSnapshot(const Snapshot* s) {
|
|
1181
|
-
MutexLock l(&mutex_);
|
|
1182
|
-
snapshots_.Delete(reinterpret_cast<const SnapshotImpl*>(s));
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
// Convenience methods
|
|
1186
|
-
Status DBImpl::Put(const WriteOptions& o, const Slice& key, const Slice& val) {
|
|
1187
|
-
return DB::Put(o, key, val);
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
Status DBImpl::Delete(const WriteOptions& options, const Slice& key) {
|
|
1191
|
-
return DB::Delete(options, key);
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
Status DBImpl::Write(const WriteOptions& options, WriteBatch* my_batch) {
|
|
1195
|
-
Writer w(&mutex_);
|
|
1196
|
-
w.batch = my_batch;
|
|
1197
|
-
w.sync = options.sync;
|
|
1198
|
-
w.done = false;
|
|
1199
|
-
|
|
1200
|
-
MutexLock l(&mutex_);
|
|
1201
|
-
writers_.push_back(&w);
|
|
1202
|
-
while (!w.done && &w != writers_.front()) {
|
|
1203
|
-
w.cv.Wait();
|
|
1204
|
-
}
|
|
1205
|
-
if (w.done) {
|
|
1206
|
-
return w.status;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
// May temporarily unlock and wait.
|
|
1210
|
-
Status status = MakeRoomForWrite(my_batch == NULL);
|
|
1211
|
-
uint64_t last_sequence = versions_->LastSequence();
|
|
1212
|
-
Writer* last_writer = &w;
|
|
1213
|
-
if (status.ok() && my_batch != NULL) { // NULL batch is for compactions
|
|
1214
|
-
WriteBatch* updates = BuildBatchGroup(&last_writer);
|
|
1215
|
-
WriteBatchInternal::SetSequence(updates, last_sequence + 1);
|
|
1216
|
-
last_sequence += WriteBatchInternal::Count(updates);
|
|
1217
|
-
|
|
1218
|
-
// Add to log and apply to memtable. We can release the lock
|
|
1219
|
-
// during this phase since &w is currently responsible for logging
|
|
1220
|
-
// and protects against concurrent loggers and concurrent writes
|
|
1221
|
-
// into mem_.
|
|
1222
|
-
{
|
|
1223
|
-
mutex_.Unlock();
|
|
1224
|
-
status = log_->AddRecord(WriteBatchInternal::Contents(updates));
|
|
1225
|
-
bool sync_error = false;
|
|
1226
|
-
if (status.ok() && options.sync) {
|
|
1227
|
-
status = logfile_->Sync();
|
|
1228
|
-
if (!status.ok()) {
|
|
1229
|
-
sync_error = true;
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
if (status.ok()) {
|
|
1233
|
-
status = WriteBatchInternal::InsertInto(updates, mem_);
|
|
1234
|
-
}
|
|
1235
|
-
mutex_.Lock();
|
|
1236
|
-
if (sync_error) {
|
|
1237
|
-
// The state of the log file is indeterminate: the log record we
|
|
1238
|
-
// just added may or may not show up when the DB is re-opened.
|
|
1239
|
-
// So we force the DB into a mode where all future writes fail.
|
|
1240
|
-
RecordBackgroundError(status);
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
if (updates == tmp_batch_) tmp_batch_->Clear();
|
|
1244
|
-
|
|
1245
|
-
versions_->SetLastSequence(last_sequence);
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
while (true) {
|
|
1249
|
-
Writer* ready = writers_.front();
|
|
1250
|
-
writers_.pop_front();
|
|
1251
|
-
if (ready != &w) {
|
|
1252
|
-
ready->status = status;
|
|
1253
|
-
ready->done = true;
|
|
1254
|
-
ready->cv.Signal();
|
|
1255
|
-
}
|
|
1256
|
-
if (ready == last_writer) break;
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
// Notify new head of write queue
|
|
1260
|
-
if (!writers_.empty()) {
|
|
1261
|
-
writers_.front()->cv.Signal();
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
return status;
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
// REQUIRES: Writer list must be non-empty
|
|
1268
|
-
// REQUIRES: First writer must have a non-NULL batch
|
|
1269
|
-
WriteBatch* DBImpl::BuildBatchGroup(Writer** last_writer) {
|
|
1270
|
-
assert(!writers_.empty());
|
|
1271
|
-
Writer* first = writers_.front();
|
|
1272
|
-
WriteBatch* result = first->batch;
|
|
1273
|
-
assert(result != NULL);
|
|
1274
|
-
|
|
1275
|
-
size_t size = WriteBatchInternal::ByteSize(first->batch);
|
|
1276
|
-
|
|
1277
|
-
// Allow the group to grow up to a maximum size, but if the
|
|
1278
|
-
// original write is small, limit the growth so we do not slow
|
|
1279
|
-
// down the small write too much.
|
|
1280
|
-
size_t max_size = 1 << 20;
|
|
1281
|
-
if (size <= (128<<10)) {
|
|
1282
|
-
max_size = size + (128<<10);
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
*last_writer = first;
|
|
1286
|
-
std::deque<Writer*>::iterator iter = writers_.begin();
|
|
1287
|
-
++iter; // Advance past "first"
|
|
1288
|
-
for (; iter != writers_.end(); ++iter) {
|
|
1289
|
-
Writer* w = *iter;
|
|
1290
|
-
if (w->sync && !first->sync) {
|
|
1291
|
-
// Do not include a sync write into a batch handled by a non-sync write.
|
|
1292
|
-
break;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
if (w->batch != NULL) {
|
|
1296
|
-
size += WriteBatchInternal::ByteSize(w->batch);
|
|
1297
|
-
if (size > max_size) {
|
|
1298
|
-
// Do not make batch too big
|
|
1299
|
-
break;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
// Append to *result
|
|
1303
|
-
if (result == first->batch) {
|
|
1304
|
-
// Switch to temporary batch instead of disturbing caller's batch
|
|
1305
|
-
result = tmp_batch_;
|
|
1306
|
-
assert(WriteBatchInternal::Count(result) == 0);
|
|
1307
|
-
WriteBatchInternal::Append(result, first->batch);
|
|
1308
|
-
}
|
|
1309
|
-
WriteBatchInternal::Append(result, w->batch);
|
|
1310
|
-
}
|
|
1311
|
-
*last_writer = w;
|
|
1312
|
-
}
|
|
1313
|
-
return result;
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
// REQUIRES: mutex_ is held
|
|
1317
|
-
// REQUIRES: this thread is currently at the front of the writer queue
|
|
1318
|
-
Status DBImpl::MakeRoomForWrite(bool force) {
|
|
1319
|
-
mutex_.AssertHeld();
|
|
1320
|
-
assert(!writers_.empty());
|
|
1321
|
-
bool allow_delay = !force;
|
|
1322
|
-
Status s;
|
|
1323
|
-
while (true) {
|
|
1324
|
-
if (!bg_error_.ok()) {
|
|
1325
|
-
// Yield previous error
|
|
1326
|
-
s = bg_error_;
|
|
1327
|
-
break;
|
|
1328
|
-
} else if (
|
|
1329
|
-
allow_delay &&
|
|
1330
|
-
versions_->NumLevelFiles(0) >= config::kL0_SlowdownWritesTrigger) {
|
|
1331
|
-
// We are getting close to hitting a hard limit on the number of
|
|
1332
|
-
// L0 files. Rather than delaying a single write by several
|
|
1333
|
-
// seconds when we hit the hard limit, start delaying each
|
|
1334
|
-
// individual write by 1ms to reduce latency variance. Also,
|
|
1335
|
-
// this delay hands over some CPU to the compaction thread in
|
|
1336
|
-
// case it is sharing the same core as the writer.
|
|
1337
|
-
mutex_.Unlock();
|
|
1338
|
-
env_->SleepForMicroseconds(1000);
|
|
1339
|
-
allow_delay = false; // Do not delay a single write more than once
|
|
1340
|
-
mutex_.Lock();
|
|
1341
|
-
} else if (!force &&
|
|
1342
|
-
(mem_->ApproximateMemoryUsage() <= options_.write_buffer_size)) {
|
|
1343
|
-
// There is room in current memtable
|
|
1344
|
-
break;
|
|
1345
|
-
} else if (imm_ != NULL) {
|
|
1346
|
-
// We have filled up the current memtable, but the previous
|
|
1347
|
-
// one is still being compacted, so we wait.
|
|
1348
|
-
Log(options_.info_log, "Current memtable full; waiting...\n");
|
|
1349
|
-
bg_cv_.Wait();
|
|
1350
|
-
} else if (versions_->NumLevelFiles(0) >= config::kL0_StopWritesTrigger) {
|
|
1351
|
-
// There are too many level-0 files.
|
|
1352
|
-
Log(options_.info_log, "Too many L0 files; waiting...\n");
|
|
1353
|
-
bg_cv_.Wait();
|
|
1354
|
-
} else {
|
|
1355
|
-
// Attempt to switch to a new memtable and trigger compaction of old
|
|
1356
|
-
assert(versions_->PrevLogNumber() == 0);
|
|
1357
|
-
uint64_t new_log_number = versions_->NewFileNumber();
|
|
1358
|
-
WritableFile* lfile = NULL;
|
|
1359
|
-
s = env_->NewWritableFile(LogFileName(dbname_, new_log_number), &lfile);
|
|
1360
|
-
if (!s.ok()) {
|
|
1361
|
-
// Avoid chewing through file number space in a tight loop.
|
|
1362
|
-
versions_->ReuseFileNumber(new_log_number);
|
|
1363
|
-
break;
|
|
1364
|
-
}
|
|
1365
|
-
delete log_;
|
|
1366
|
-
delete logfile_;
|
|
1367
|
-
logfile_ = lfile;
|
|
1368
|
-
logfile_number_ = new_log_number;
|
|
1369
|
-
log_ = new log::Writer(lfile);
|
|
1370
|
-
imm_ = mem_;
|
|
1371
|
-
has_imm_.Release_Store(imm_);
|
|
1372
|
-
mem_ = new MemTable(internal_comparator_);
|
|
1373
|
-
mem_->Ref();
|
|
1374
|
-
force = false; // Do not force another compaction if have room
|
|
1375
|
-
MaybeScheduleCompaction();
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
return s;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
bool DBImpl::GetProperty(const Slice& property, std::string* value) {
|
|
1382
|
-
value->clear();
|
|
1383
|
-
|
|
1384
|
-
MutexLock l(&mutex_);
|
|
1385
|
-
Slice in = property;
|
|
1386
|
-
Slice prefix("leveldb.");
|
|
1387
|
-
if (!in.starts_with(prefix)) return false;
|
|
1388
|
-
in.remove_prefix(prefix.size());
|
|
1389
|
-
|
|
1390
|
-
if (in.starts_with("num-files-at-level")) {
|
|
1391
|
-
in.remove_prefix(strlen("num-files-at-level"));
|
|
1392
|
-
uint64_t level;
|
|
1393
|
-
bool ok = ConsumeDecimalNumber(&in, &level) && in.empty();
|
|
1394
|
-
if (!ok || level >= config::kNumLevels) {
|
|
1395
|
-
return false;
|
|
1396
|
-
} else {
|
|
1397
|
-
char buf[100];
|
|
1398
|
-
snprintf(buf, sizeof(buf), "%d",
|
|
1399
|
-
versions_->NumLevelFiles(static_cast<int>(level)));
|
|
1400
|
-
*value = buf;
|
|
1401
|
-
return true;
|
|
1402
|
-
}
|
|
1403
|
-
} else if (in == "stats") {
|
|
1404
|
-
char buf[200];
|
|
1405
|
-
snprintf(buf, sizeof(buf),
|
|
1406
|
-
" Compactions\n"
|
|
1407
|
-
"Level Files Size(MB) Time(sec) Read(MB) Write(MB)\n"
|
|
1408
|
-
"--------------------------------------------------\n"
|
|
1409
|
-
);
|
|
1410
|
-
value->append(buf);
|
|
1411
|
-
for (int level = 0; level < config::kNumLevels; level++) {
|
|
1412
|
-
int files = versions_->NumLevelFiles(level);
|
|
1413
|
-
if (stats_[level].micros > 0 || files > 0) {
|
|
1414
|
-
snprintf(
|
|
1415
|
-
buf, sizeof(buf),
|
|
1416
|
-
"%3d %8d %8.0f %9.0f %8.0f %9.0f\n",
|
|
1417
|
-
level,
|
|
1418
|
-
files,
|
|
1419
|
-
versions_->NumLevelBytes(level) / 1048576.0,
|
|
1420
|
-
stats_[level].micros / 1e6,
|
|
1421
|
-
stats_[level].bytes_read / 1048576.0,
|
|
1422
|
-
stats_[level].bytes_written / 1048576.0);
|
|
1423
|
-
value->append(buf);
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
return true;
|
|
1427
|
-
} else if (in == "sstables") {
|
|
1428
|
-
*value = versions_->current()->DebugString();
|
|
1429
|
-
return true;
|
|
1430
|
-
} else if (in == "approximate-memory-usage") {
|
|
1431
|
-
size_t total_usage = options_.block_cache->TotalCharge();
|
|
1432
|
-
if (mem_) {
|
|
1433
|
-
total_usage += mem_->ApproximateMemoryUsage();
|
|
1434
|
-
}
|
|
1435
|
-
if (imm_) {
|
|
1436
|
-
total_usage += imm_->ApproximateMemoryUsage();
|
|
1437
|
-
}
|
|
1438
|
-
char buf[50];
|
|
1439
|
-
snprintf(buf, sizeof(buf), "%llu",
|
|
1440
|
-
static_cast<unsigned long long>(total_usage));
|
|
1441
|
-
value->append(buf);
|
|
1442
|
-
return true;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
return false;
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
void DBImpl::GetApproximateSizes(
|
|
1449
|
-
const Range* range, int n,
|
|
1450
|
-
uint64_t* sizes) {
|
|
1451
|
-
// TODO(opt): better implementation
|
|
1452
|
-
Version* v;
|
|
1453
|
-
{
|
|
1454
|
-
MutexLock l(&mutex_);
|
|
1455
|
-
versions_->current()->Ref();
|
|
1456
|
-
v = versions_->current();
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
for (int i = 0; i < n; i++) {
|
|
1460
|
-
// Convert user_key into a corresponding internal key.
|
|
1461
|
-
InternalKey k1(range[i].start, kMaxSequenceNumber, kValueTypeForSeek);
|
|
1462
|
-
InternalKey k2(range[i].limit, kMaxSequenceNumber, kValueTypeForSeek);
|
|
1463
|
-
uint64_t start = versions_->ApproximateOffsetOf(v, k1);
|
|
1464
|
-
uint64_t limit = versions_->ApproximateOffsetOf(v, k2);
|
|
1465
|
-
sizes[i] = (limit >= start ? limit - start : 0);
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
{
|
|
1469
|
-
MutexLock l(&mutex_);
|
|
1470
|
-
v->Unref();
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
// Default implementations of convenience methods that subclasses of DB
|
|
1475
|
-
// can call if they wish
|
|
1476
|
-
Status DB::Put(const WriteOptions& opt, const Slice& key, const Slice& value) {
|
|
1477
|
-
WriteBatch batch;
|
|
1478
|
-
batch.Put(key, value);
|
|
1479
|
-
return Write(opt, &batch);
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
Status DB::Delete(const WriteOptions& opt, const Slice& key) {
|
|
1483
|
-
WriteBatch batch;
|
|
1484
|
-
batch.Delete(key);
|
|
1485
|
-
return Write(opt, &batch);
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
DB::~DB() { }
|
|
1489
|
-
|
|
1490
|
-
Status DB::Open(const Options& options, const std::string& dbname,
|
|
1491
|
-
DB** dbptr) {
|
|
1492
|
-
*dbptr = NULL;
|
|
1493
|
-
|
|
1494
|
-
DBImpl* impl = new DBImpl(options, dbname);
|
|
1495
|
-
impl->mutex_.Lock();
|
|
1496
|
-
VersionEdit edit;
|
|
1497
|
-
// Recover handles create_if_missing, error_if_exists
|
|
1498
|
-
bool save_manifest = false;
|
|
1499
|
-
Status s = impl->Recover(&edit, &save_manifest);
|
|
1500
|
-
if (s.ok() && impl->mem_ == NULL) {
|
|
1501
|
-
// Create new log and a corresponding memtable.
|
|
1502
|
-
uint64_t new_log_number = impl->versions_->NewFileNumber();
|
|
1503
|
-
WritableFile* lfile;
|
|
1504
|
-
s = options.env->NewWritableFile(LogFileName(dbname, new_log_number),
|
|
1505
|
-
&lfile);
|
|
1506
|
-
if (s.ok()) {
|
|
1507
|
-
edit.SetLogNumber(new_log_number);
|
|
1508
|
-
impl->logfile_ = lfile;
|
|
1509
|
-
impl->logfile_number_ = new_log_number;
|
|
1510
|
-
impl->log_ = new log::Writer(lfile);
|
|
1511
|
-
impl->mem_ = new MemTable(impl->internal_comparator_);
|
|
1512
|
-
impl->mem_->Ref();
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
if (s.ok() && save_manifest) {
|
|
1516
|
-
edit.SetPrevLogNumber(0); // No older logs needed after recovery.
|
|
1517
|
-
edit.SetLogNumber(impl->logfile_number_);
|
|
1518
|
-
s = impl->versions_->LogAndApply(&edit, &impl->mutex_);
|
|
1519
|
-
}
|
|
1520
|
-
if (s.ok()) {
|
|
1521
|
-
impl->DeleteObsoleteFiles();
|
|
1522
|
-
impl->MaybeScheduleCompaction();
|
|
1523
|
-
}
|
|
1524
|
-
impl->mutex_.Unlock();
|
|
1525
|
-
if (s.ok()) {
|
|
1526
|
-
assert(impl->mem_ != NULL);
|
|
1527
|
-
*dbptr = impl;
|
|
1528
|
-
} else {
|
|
1529
|
-
delete impl;
|
|
1530
|
-
}
|
|
1531
|
-
return s;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
Snapshot::~Snapshot() {
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
Status DestroyDB(const std::string& dbname, const Options& options) {
|
|
1538
|
-
Env* env = options.env;
|
|
1539
|
-
std::vector<std::string> filenames;
|
|
1540
|
-
// Ignore error in case directory does not exist
|
|
1541
|
-
env->GetChildren(dbname, &filenames);
|
|
1542
|
-
if (filenames.empty()) {
|
|
1543
|
-
return Status::OK();
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
FileLock* lock;
|
|
1547
|
-
const std::string lockname = LockFileName(dbname);
|
|
1548
|
-
Status result = env->LockFile(lockname, &lock);
|
|
1549
|
-
if (result.ok()) {
|
|
1550
|
-
uint64_t number;
|
|
1551
|
-
FileType type;
|
|
1552
|
-
for (size_t i = 0; i < filenames.size(); i++) {
|
|
1553
|
-
if (ParseFileName(filenames[i], &number, &type) &&
|
|
1554
|
-
type != kDBLockFile) { // Lock file will be deleted at end
|
|
1555
|
-
Status del = env->DeleteFile(dbname + "/" + filenames[i]);
|
|
1556
|
-
if (result.ok() && !del.ok()) {
|
|
1557
|
-
result = del;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
env->UnlockFile(lock); // Ignore error since state is already gone
|
|
1562
|
-
env->DeleteFile(lockname);
|
|
1563
|
-
env->DeleteDir(dbname); // Ignore error in case dir contains other files
|
|
1564
|
-
}
|
|
1565
|
-
return result;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
} // namespace leveldb
|