diff --git a/src/claimtrie/forks.cpp b/src/claimtrie/forks.cpp index d2010662a..393d036c3 100644 --- a/src/claimtrie/forks.cpp +++ b/src/claimtrie/forks.cpp @@ -4,8 +4,6 @@ #include #include -#include - #include #include #include @@ -254,15 +252,15 @@ CUint256 CClaimTrieCacheHashFork::computeNodeHash(const std::string& name, int t return CClaimTrieCacheNormalizationFork::computeNodeHash(name, takeoverHeight); std::vector childHashes; - childHashQuery << name >> [&childHashes](std::string name, CUint256 hash) { + childHashQuery << name >> [&childHashes](std::string, CUint256 hash) { childHashes.push_back(std::move(hash)); }; childHashQuery++; std::vector claimHashes; //if (takeoverHeight > 0) { + CTxOutPoint p; for (auto &&row: claimHashQuery << nNextHeight << name) { - CTxOutPoint p; row >> p.hash >> p.n; claimHashes.push_back(getValueHash(p, takeoverHeight)); } diff --git a/src/claimtrie/takeoverworkarounds.h b/src/claimtrie/takeoverworkarounds.h new file mode 100644 index 000000000..bc547b7c0 --- /dev/null +++ b/src/claimtrie/takeoverworkarounds.h @@ -0,0 +1,455 @@ + +#ifndef TAKEOVERWORKAROUNDS_H +#define TAKEOVERWORKAROUNDS_H + +#include + +#include + +const boost::container::flat_map, int> takeoverWorkarounds = { + {{496856, "HunterxHunterAMV"}, 496835}, + {{542978, "namethattune1"}, 542429}, + {{543508, "namethattune-5"}, 543306}, + {{546780, "forecasts"}, 546624}, + {{548730, "forecasts"}, 546780}, + {{551540, "forecasts"}, 548730}, + {{552380, "chicthinkingofyou"}, 550804}, + {{560363, "takephotowithlbryteam"}, 559962}, + {{563710, "test-img"}, 563700}, + {{566750, "itila"}, 543261}, + {{567082, "malabarismo-com-bolas-de-futebol-vs-chap"}, 563592}, + {{596860, "180mphpullsthrougheurope"}, 596757}, + {{617743, "vaccines"}, 572756}, + {{619609, "copface-slamshandcuffedteengirlintoconcrete"}, 539940}, + {{620392, "banker-exposes-satanic-elite"}, 597788}, + {{624997, "direttiva-sulle-armi-ue-in-svizzera-di"}, 567908}, + {{624997, "best-of-apex"}, 585580}, + {{629970, "cannot-ignore-my-veins"}, 629914}, + {{633058, "bio-waste-we-programmed-your-brain"}, 617185}, + {{633601, "macrolauncher-overview-first-look"}, 633058}, + {{640186, "its-up-to-you-and-i-2019"}, 639116}, + {{640241, "tor-eas-3-20"}, 592645}, + {{640522, "seadoxdark"}, 619531}, + {{640617, "lbry-przewodnik-1-instalacja"}, 451186}, + {{640623, "avxchange-2019-the-next-netflix-spotify"}, 606790}, + {{640684, "algebra-introduction"}, 624152}, + {{640684, "a-high-school-math-teacher-does-a"}, 600885}, + {{640684, "another-random-life-update"}, 600884}, + {{640684, "who-is-the-taylor-series-for"}, 600882}, + {{640684, "tedx-talk-released"}, 612303}, + {{640730, "e-mental"}, 615375}, + {{641143, "amiga-1200-bespoke-virgin-cinema"}, 623542}, + {{641161, "dreamscape-432-omega"}, 618894}, + {{641162, "2019-topstone-carbon-force-etap-axs-bike"}, 639107}, + {{641186, "arin-sings-big-floppy-penis-live-jazz-2"}, 638904}, + {{641421, "edward-snowden-on-bitcoin-and-privacy"}, 522729}, + {{641421, "what-is-libra-facebook-s-new"}, 598236}, + {{641421, "what-are-stablecoins-counter-party-risk"}, 583508}, + {{641421, "anthony-pomp-pompliano-discusses-crypto"}, 564416}, + {{641421, "tim-draper-crypto-invest-summit-2019"}, 550329}, + {{641421, "mass-adoption-and-what-will-it-take-to"}, 549781}, + {{641421, "dragonwolftech-youtube-channel-trailer"}, 567128}, + {{641421, "naomi-brockwell-s-weekly-crypto-recap"}, 540006}, + {{641421, "blockchain-based-youtube-twitter"}, 580809}, + {{641421, "andreas-antonopoulos-on-privacy-privacy"}, 533522}, + {{641817, "mexico-submits-and-big-tech-worsens"}, 582977}, + {{641817, "why-we-need-travel-bans"}, 581354}, + {{641880, "censored-by-patreon-bitchute-shares"}, 482460}, + {{641880, "crypto-wonderland"}, 485218}, + {{642168, "1-diabolo-julio-cezar-16-cbmcp-freestyle"}, 374999}, + {{642314, "tough-students"}, 615780}, + {{642697, "gamercauldronep2"}, 642153}, + {{643406, "the-most-fun-i-ve-had-in-a-long-time"}, 616506}, + {{643893, "spitshine69-and-uk-freedom-audits"}, 616876}, + {{644480, "my-mum-getting-attacked-a-duck"}, 567624}, + {{644486, "the-cryptocurrency-experiment"}, 569189}, + {{644486, "tag-you-re-it"}, 558316}, + {{644486, "orange-county-mineral-society-rock-and"}, 397138}, + {{644486, "sampling-with-the-gold-rush-nugget"}, 527960}, + {{644562, "september-15-21-a-new-way-of-doing"}, 634792}, + {{644562, "july-week-3-collective-frequency-general"}, 607942}, + {{644562, "september-8-14-growing-up-general"}, 630977}, + {{644562, "august-4-10-collective-frequency-general"}, 612307}, + {{644562, "august-11-17-collective-frequency"}, 617279}, + {{644562, "september-1-7-gentle-wake-up-call"}, 627104}, + {{644607, "no-more-lol"}, 643497}, + {{644607, "minion-masters-who-knew"}, 641313}, + {{645236, "danganronpa-3-the-end-of-hope-s-peak"}, 644153}, + {{645348, "captchabot-a-discord-bot-to-protect-your"}, 592810}, + {{645701, "the-xero-hour-saint-greta-of-thunberg"}, 644081}, + {{645701, "batman-v-superman-theological-notions"}, 590189}, + {{645918, "emacs-is-great-ep-0-init-el-from-org"}, 575666}, + {{645918, "emacs-is-great-ep-1-packages"}, 575666}, + {{645918, "emacs-is-great-ep-40-pt-2-hebrew"}, 575668}, + {{645923, "nasal-snuff-review-osp-batch-2"}, 575658}, + {{645923, "why-bit-coin"}, 575658}, + {{645929, "begin-quest"}, 598822}, + {{645929, "filthy-foe"}, 588386}, + {{645929, "unsanitary-snow"}, 588386}, + {{645929, "famispam-1-music-box"}, 588386}, + {{645929, "running-away"}, 598822}, + {{645931, "my-beloved-chris-madsen"}, 589114}, + {{645931, "space-is-consciousness-chris-madsen"}, 589116}, + {{645947, "gasifier-rocket-stove-secondary-burn"}, 590595}, + {{645949, "mouse-razer-abyssus-v2-e-mousepad"}, 591139}, + {{645949, "pr-temporada-2018-league-of-legends"}, 591138}, + {{645949, "windows-10-build-9901-pt-br"}, 591137}, + {{645949, "abrindo-pacotes-do-festival-lunar-2018"}, 591139}, + {{645949, "unboxing-camisetas-personalizadas-play-e"}, 591138}, + {{645949, "abrindo-envelopes-do-festival-lunar-2017"}, 591138}, + {{645951, "grub-my-grub-played-guruku-tersayang"}, 618033}, + {{645951, "ismeeltimepiece"}, 618038}, + {{645951, "thoughts-on-doom"}, 596485}, + {{645951, "thoughts-on-god-of-war-about-as-deep-as"}, 596485}, + {{645956, "linux-lite-3-6-see-what-s-new"}, 645195}, + {{646191, "kahlil-gibran-the-prophet-part-1"}, 597637}, + {{646551, "crypto-market-crash-should-you-sell-your"}, 442613}, + {{646551, "live-crypto-trading-and-market-analysis"}, 442615}, + {{646551, "5-reasons-trading-is-always-better-than"}, 500850}, + {{646551, "digitex-futures-dump-panic-selling-or"}, 568065}, + {{646552, "how-to-install-polarr-on-kali-linux-bynp"}, 466235}, + {{646586, "electoral-college-kids-civics-lesson"}, 430818}, + {{646602, "grapes-full-90-minute-watercolour"}, 537108}, + {{646602, "meizu-mx4-the-second-ubuntu-phone"}, 537109}, + {{646609, "how-to-set-up-the-ledger-nano-x"}, 569992}, + {{646609, "how-to-buy-ethereum"}, 482354}, + {{646609, "how-to-install-setup-the-exodus-multi"}, 482356}, + {{646609, "how-to-manage-your-passwords-using"}, 531987}, + {{646609, "cryptodad-s-live-q-a-friday-may-3rd-2019"}, 562303}, + {{646638, "resident-evil-ada-chapter-5-final"}, 605612}, + {{646639, "taurus-june-2019-career-love-tarot"}, 586910}, + {{646652, "digital-bullpen-ep-5-building-a-digital"}, 589274}, + {{646661, "sunlight"}, 591076}, + {{646661, "grasp-lab-nasa-open-mct-series"}, 589414}, + {{646663, "bunnula-s-creepers-tim-pool-s-beanie-a"}, 599669}, + {{646663, "bunnula-music-hey-ya-by-outkast"}, 605685}, + {{646663, "bunnula-tv-s-music-television-eunoia"}, 644437}, + {{646663, "the-pussy-centipede-40-sneakers-and"}, 587265}, + {{646663, "bunnula-reacts-ashton-titty-whitty"}, 596988}, + {{646677, "filip-reviews-jeromes-dream-cataracts-so"}, 589751}, + {{646691, "fascism-and-its-mobilizing-passions"}, 464342}, + {{646692, "hsb-color-layers-action-for-adobe"}, 586533}, + {{646692, "master-colorist-action-pack-extracting"}, 631830}, + {{646693, "how-to-protect-your-garden-from-animals"}, 588476}, + {{646693, "gardening-for-the-apocalypse-epic"}, 588472}, + {{646693, "my-first-bee-hive-foundationless-natural"}, 588469}, + {{646693, "dragon-fruit-and-passion-fruit-planting"}, 588470}, + {{646693, "installing-my-first-foundationless"}, 588469}, + {{646705, "first-naza-fpv"}, 590411}, + {{646717, "first-burning-man-2019-detour-034"}, 630247}, + {{646717, "why-bob-marley-was-an-idiot-test-driving"}, 477558}, + {{646717, "we-are-addicted-to-gambling-ufc-207-w"}, 481398}, + {{646717, "ghetto-swap-meet-selling-storage-lockers"}, 498291}, + {{646738, "1-kings-chapter-7-summary-and-what-god"}, 586599}, + {{646814, "brand-spanking-new-junior-high-school"}, 592378}, + {{646814, "lupe-fiasco-freestyle-at-end-of-the-weak"}, 639535}, + {{646824, "how-to-one-stroke-painting-doodles-mixed"}, 592404}, + {{646824, "acrylic-pouring-landscape-with-a-tree"}, 592404}, + {{646824, "how-to-make-a-diy-concrete-paste-planter"}, 595976}, + {{646824, "how-to-make-a-rustic-sand-planter-sand"}, 592404}, + {{646833, "3-day-festival-at-the-galilee-lake-and"}, 592842}, + {{646833, "rainbow-circle-around-the-noon-sun-above"}, 592842}, + {{646833, "energetic-self-control-demonstration"}, 623811}, + {{646833, "bees-congregating"}, 592842}, + {{646856, "formula-offroad-honefoss-sunday-track2"}, 592872}, + {{646862, "h3video1-dc-vs-mb-1"}, 593237}, + {{646862, "h3video1-iwasgoingto-load-up-gmod-but"}, 593237}, + {{646883, "watch-this-game-developer-make-a-video"}, 592593}, + {{646883, "how-to-write-secure-javascript"}, 592593}, + {{646883, "blockchain-technology-explained-2-hour"}, 592593}, + {{646888, "fl-studio-bits"}, 608155}, + {{646914, "andy-s-shed-live-s03e02-the-longest"}, 592200}, + {{646914, "gpo-telephone-776-phone-restoration"}, 592201}, + {{646916, "toxic-studios-co-stream-pubg"}, 597126}, + {{646916, "hyperlapse-of-prague-praha-from-inside"}, 597109}, + {{646933, "videobits-1"}, 597378}, + {{646933, "clouds-developing-daytime-8"}, 597378}, + {{646933, "slechtvalk-in-watertoren-bodegraven"}, 597378}, + {{646933, "timelapse-maansverduistering-16-juli"}, 605880}, + {{646933, "startrails-27"}, 597378}, + {{646933, "passing-clouds-daytime-3"}, 597378}, + {{646940, "nerdgasm-unboxing-massive-playing-cards"}, 597421}, + {{646946, "debunking-cops-volume-3-the-murder-of"}, 630570}, + {{646961, "kingsong-ks16x-electric-unicycle-250km"}, 636725}, + {{646968, "wild-mountain-goats-amazing-rock"}, 621940}, + {{646968, "no-shelter-backcountry-camping-in"}, 621940}, + {{646968, "can-i-live-in-this-through-winter-lets"}, 645750}, + {{646968, "why-i-wear-a-chest-rig-backcountry-or"}, 621940}, + {{646989, "marc-ivan-o-gorman-promo-producer-editor"}, 645656}, + {{647045, "@moraltis"}, 646367}, + {{647045, "moraltis-twitch-highlights-first-edit"}, 646368}, + {{647075, "the-3-massive-tinder-convo-mistakes"}, 629464}, + {{647075, "how-to-get-friend-zoned-via-text"}, 592298}, + {{647075, "don-t-do-this-on-tinder"}, 624591}, + {{647322, "world-of-tanks-7-kills"}, 609905}, + {{647322, "the-tier-6-auto-loading-swedish-meatball"}, 591338}, + {{647416, "hypnotic-soundscapes-garden-of-the"}, 596923}, + {{647416, "hypnotic-soundscapes-the-cauldron-sacred"}, 596928}, + {{647416, "schumann-resonance-to-theta-sweep"}, 596920}, + {{647416, "conversational-indirect-hypnosis-why"}, 596913}, + {{647493, "mimirs-brunnr"}, 590498}, + {{648143, "live-ita-completiamo-the-evil-within-2"}, 646568}, + {{648203, "why-we-love-people-that-hurt-us"}, 591128}, + {{648203, "i-didn-t-like-my-baby-and-considered"}, 591128}, + {{648220, "trade-talk-001-i-m-a-vlogger-now-fielder"}, 597303}, + {{648220, "vise-restoration-record-no-6-vise"}, 597303}, + {{648540, "amv-reign"}, 571863}, + {{648540, "amv-virus"}, 571863}, + {{648588, "audial-drift-(a-journey-into-sound)"}, 630217}, + {{648616, "quick-zbrush-tip-transpose-master-scale"}, 463205}, + {{648616, "how-to-create-3d-horns-maya-to-zbrush-2"}, 463205}, + {{648815, "arduino-based-cartridge-game-handheld"}, 593252}, + {{648815, "a-maze-update-3-new-game-modes-amazing"}, 593252}, + {{649209, "denmark-trip"}, 591428}, + {{649209, "stunning-4k-drone-footage"}, 591428}, + {{649215, "how-to-create-a-channel-and-publish-a"}, 414908}, + {{649215, "lbryclass-11-how-to-get-your-deposit"}, 632420}, + {{649543, "spring-break-madness-at-universal"}, 599698}, + {{649921, "navegador-brave-navegador-da-web-seguro"}, 649261}, + {{650191, "stream-intro"}, 591301}, + {{650946, "platelet-chan-fan-art"}, 584601}, + {{650946, "aqua-fanart"}, 584601}, + {{650946, "virginmedia-stores-password-in-plain"}, 619537}, + {{650946, "running-linux-on-android-teaser"}, 604441}, + {{650946, "hatsune-miku-ievan-polka"}, 600126}, + {{650946, "digital-security-and-privacy-2-and-a-new"}, 600135}, + {{650993, "my-editorial-comment-on-recent-youtube"}, 590305}, + {{650993, "drive-7-18-2018"}, 590305}, + {{651011, "old-world-put-on-realm-realms-gg"}, 591899}, + {{651011, "make-your-own-soundboard-with-autohotkey"}, 591899}, + {{651011, "ark-survival-https-discord-gg-ad26xa"}, 637680}, + {{651011, "minecraft-featuring-seus-8-just-came-4"}, 596488}, + {{651057, "found-footage-bikinis-at-the-beach-with"}, 593586}, + {{651057, "found-footage-sexy-mom-a-mink-stole"}, 593586}, + {{651067, "who-are-the-gentiles-gomer"}, 597094}, + {{651067, "take-back-the-kingdom-ep-2-450-million"}, 597094}, + {{651067, "mmxtac-implemented-footstep-sounds-and"}, 597094}, + {{651067, "dynasoul-s-blender-to-unreal-animated"}, 597094}, + {{651103, "calling-a-scammer-syntax-error"}, 612532}, + {{651103, "quick-highlight-of-my-day"}, 647651}, + {{651103, "calling-scammers-and-singing-christmas"}, 612531}, + {{651109, "@livingtzm"}, 637322}, + {{651109, "living-tzm-juuso-from-finland-september"}, 643412}, + {{651373, "se-voc-rir-ou-sorrir-reinicie-o-v-deo"}, 649302}, + {{651476, "what-is-pagan-online-polished-new-arpg"}, 592157}, + {{651476, "must-have-elder-scrolls-online-addons"}, 592156}, + {{651476, "who-should-play-albion-online"}, 592156}, + {{651730, "person-detection-with-keras-tensorflow"}, 621276}, + {{651730, "youtube-censorship-take-two"}, 587249}, + {{651730, "new-red-tail-shark-and-two-silver-sharks"}, 587251}, + {{651730, "around-auckland"}, 587250}, + {{651730, "humanism-in-islam"}, 587250}, + {{651730, "tigers-at-auckland-zoo"}, 587250}, + {{651730, "gravity-demonstration"}, 587250}, + {{651730, "copyright-question"}, 587249}, + {{651730, "uberg33k-the-ultimate-software-developer"}, 599522}, + {{651730, "chl-e-swarbrick-auckland-mayoral"}, 587250}, + {{651730, "code-reviews"}, 587249}, + {{651730, "raising-robots"}, 587251}, + {{651730, "teaching-python"}, 587250}, + {{651730, "kelly-tarlton-2016"}, 587250}, + {{652172, "where-is-everything"}, 589491}, + {{652172, "some-guy-and-his-camera"}, 617062}, + {{652172, "practical-information-pt-1"}, 589491}, + {{652172, "latent-vibrations"}, 589491}, + {{652172, "maldek-compilation"}, 589491}, + {{652444, "thank-you-etika-thank-you-desmond"}, 652121}, + {{652611, "plants-vs-zombies-gw2-20190827183609"}, 624339}, + {{652611, "wolfenstein-the-new-order-playthrough-6"}, 650299}, + {{652887, "a-codeigniter-cms-open-source-download"}, 652737}, + {{652966, "@pokesadventures"}, 632391}, + {{653009, "flat-earth-uk-convention-is-a-bust"}, 585786}, + {{653009, "flat-earth-reset-flat-earth-money-tree"}, 585786}, + {{653011, "veil-of-thorns-dispirit-brutal-leech-3"}, 652475}, + {{653069, "being-born-after-9-11"}, 632218}, + {{653069, "8-years-on-youtube-what-it-has-done-for"}, 637130}, + {{653069, "answering-questions-how-original"}, 521447}, + {{653069, "talking-about-my-first-comedy-stand-up"}, 583450}, + {{653069, "doing-push-ups-in-public"}, 650920}, + {{653069, "vlog-extra"}, 465997}, + {{653069, "crying-myself"}, 465997}, + {{653069, "xbox-rejection"}, 465992}, + {{653354, "msps-how-to-find-a-linux-job-where-no"}, 642537}, + {{653354, "windows-is-better-than-linux-vlog-it-and"}, 646306}, + {{653354, "luke-smith-is-wrong-about-everything"}, 507717}, + {{653354, "advice-for-those-starting-out-in-tech"}, 612452}, + {{653354, "treating-yourself-to-make-studying-more"}, 623561}, + {{653354, "lpi-linux-essential-dns-tools-vlog-what"}, 559464}, + {{653354, "is-learning-linux-worth-it-in-2019-vlog"}, 570886}, + {{653354, "huawei-linux-and-cellphones-in-2019-vlog"}, 578501}, + {{653354, "how-to-use-webmin-to-manage-linux"}, 511507}, + {{653354, "latency-concurrency-and-the-best-value"}, 596857}, + {{653354, "how-to-use-the-pomodoro-method-in-it"}, 506632}, + {{653354, "negotiating-compensation-vlog-it-and"}, 542317}, + {{653354, "procedural-goals-vs-outcome-goals-vlog"}, 626785}, + {{653354, "intro-to-raid-understanding-how-raid"}, 529341}, + {{653354, "smokeping"}, 574693}, + {{653354, "richard-stallman-should-not-be-fired"}, 634928}, + {{653354, "unusual-or-specialty-certifications-vlog"}, 620146}, + {{653354, "gratitude-and-small-projects-vlog-it"}, 564900}, + {{653354, "why-linux-on-the-smartphone-is-important"}, 649543}, + {{653354, "opportunity-costs-vlog-it-devops-career"}, 549708}, + {{653354, "double-giveaway-lpi-class-dates-and"}, 608129}, + {{653354, "linux-on-the-smartphone-in-2019-librem"}, 530426}, + {{653524, "celtic-folk-music-full-live-concert-mps"}, 589762}, + {{653745, "aftermath-of-the-mac"}, 592768}, + {{653745, "b-c-a-glock-17-threaded-barrel"}, 592770}, + {{653800, "middle-earth-shadow-of-mordor-by"}, 590229}, + {{654079, "tomand-jeremy-chirs45"}, 614296}, + {{654096, "achamos-carteira-com-grana-olha-o-que"}, 466262}, + {{654096, "viagem-bizarra-e-cansativa-ao-nordeste"}, 466263}, + {{654096, "tedio-na-tailandia-limpeza-de-area"}, 466265}, + {{654425, "schau-bung-2014-in-windischgarsten"}, 654410}, + {{654425, "mitternachtseinlage-ball-rk"}, 654410}, + {{654425, "zugabe-ball-rk-windischgarsten"}, 654412}, + {{654722, "skytrain-in-korea"}, 463145}, + {{654722, "luwak-coffee-the-shit-coffee"}, 463155}, + {{654722, "puppet-show-in-bangkok-thailand"}, 462812}, + {{654722, "kyaito-market-myanmar"}, 462813}, + {{654724, "wipeout-zombies-bo3-custom-zombies-1st"}, 589569}, + {{654724, "the-street-bo3-custom-zombies"}, 589544}, + {{654880, "wwii-airsoft-pow"}, 586968}, + {{654880, "dueling-geese-fight-to-the-death"}, 586968}, + {{654880, "wwii-airsoft-torgau-raw-footage-part4"}, 586968}, + {{655173, "april-2019-q-and-a"}, 554032}, + {{655173, "the-meaning-and-reality-of-individual"}, 607892}, + {{655173, "steven-pinker-progress-despite"}, 616984}, + {{655173, "we-make-stories-out-of-totem-poles"}, 549090}, + {{655173, "jamil-jivani-author-of-why-young-men"}, 542035}, + {{655173, "commentaries-on-jb-peterson-rebel-wisdom"}, 528898}, + {{655173, "auckland-clip-4-on-cain-and-abel"}, 629242}, + {{655173, "peterson-vs-zizek-livestream-tickets"}, 545285}, + {{655173, "auckland-clip-3-the-dawning-of-the-moral"}, 621154}, + {{655173, "religious-belief-and-the-enlightenment"}, 606269}, + {{655173, "auckland-lc-highlight-1-the-presumption"}, 565783}, + {{655173, "q-a-sir-roger-scruton-dr-jordan-b"}, 544184}, + {{655173, "cancellation-polish-national-foundation"}, 562529}, + {{655173, "the-coddling-of-the-american-mind-haidt"}, 440185}, + {{655173, "02-harris-weinstein-peterson-discussion"}, 430896}, + {{655173, "jordan-peterson-threatens-everything-of"}, 519737}, + {{655173, "on-claiming-belief-in-god-commentary"}, 581738}, + {{655173, "how-to-make-the-world-better-really-with"}, 482317}, + {{655173, "quillette-discussion-with-founder-editor"}, 413749}, + {{655173, "jb-peterson-on-free-thought-and-speech"}, 462849}, + {{655173, "marxism-zizek-peterson-official-video"}, 578453}, + {{655173, "patreon-problem-solution-dave-rubin-dr"}, 490394}, + {{655173, "next-week-st-louis-salt-lake-city"}, 445933}, + {{655173, "conversations-with-john-anderson-jordan"}, 529981}, + {{655173, "nz-australia-12-rules-tour-next-2-weeks"}, 518649}, + {{655173, "a-call-to-rebellion-for-ontario-legal"}, 285451}, + {{655173, "2016-personality-lecture-12"}, 578465}, + {{655173, "on-the-vital-necessity-of-free-speech"}, 427404}, + {{655173, "2017-01-23-social-justice-freedom-of"}, 578465}, + {{655173, "discussion-sam-harris-the-idw-and-the"}, 423332}, + {{655173, "march-2018-patreon-q-a"}, 413749}, + {{655173, "take-aim-even-badly"}, 490395}, + {{655173, "jp-f-wwbgo6a2w"}, 539940}, + {{655173, "patreon-account-deletion"}, 503477}, + {{655173, "canada-us-europe-tour-august-dec-2018"}, 413749}, + {{655173, "leaders-myth-reality-general-stanley"}, 514333}, + {{655173, "jp-ifi5kkxig3s"}, 539940}, + {{655173, "documentary-a-glitch-in-the-matrix-david"}, 413749}, + {{655173, "2017-08-14-patreon-q-and-a"}, 285451}, + {{655173, "postmodernism-history-and-diagnosis"}, 285451}, + {{655173, "23-minutes-from-maps-of-meaning-the"}, 413749}, + {{655173, "milo-forbidden-conversation"}, 578493}, + {{655173, "jp-wnjbasba-qw"}, 539940}, + {{655173, "uk-12-rules-tour-october-and-november"}, 462849}, + {{655173, "2015-maps-of-meaning-10-culture-anomaly"}, 578465}, + {{655173, "ayaan-hirsi-ali-islam-mecca-vs-medina"}, 285452}, + {{655173, "jp-f9393el2z1i"}, 539940}, + {{655173, "campus-indoctrination-the-parasitization"}, 285453}, + {{655173, "jp-owgc63khcl8"}, 539940}, + {{655173, "the-death-and-resurrection-of-christ-a"}, 413749}, + {{655173, "01-harris-weinstein-peterson-discussion"}, 430896}, + {{655173, "enlightenment-now-steven-pinker-jb"}, 413749}, + {{655173, "the-lindsay-shepherd-affair-update"}, 413749}, + {{655173, "jp-g3fwumq5k8i"}, 539940}, + {{655173, "jp-evvs3l-abv4"}, 539940}, + {{655173, "former-australian-deputy-pm-john"}, 413750}, + {{655173, "message-to-my-korean-readers-90-seconds"}, 477424}, + {{655173, "jp--0xbomwjkgm"}, 539940}, + {{655173, "ben-shapiro-jordan-peterson-and-a-12"}, 413749}, + {{655173, "jp-91jwsb7zyhw"}, 539940}, + {{655173, "deconstruction-the-lindsay-shepherd"}, 299272}, + {{655173, "september-patreon-q-a"}, 285451}, + {{655173, "jp-2c3m0tt5kce"}, 539940}, + {{655173, "australia-s-john-anderson-dr-jordan-b"}, 413749}, + {{655173, "jp-hdrlq7dpiws"}, 539940}, + {{655173, "stephen-hicks-postmodernism-reprise"}, 578480}, + {{655173, "october-patreon-q-a"}, 285451}, + {{655173, "an-animated-intro-to-truth-order-and"}, 413749}, + {{655173, "jp-bsh37-x5rny"}, 539940}, + {{655173, "january-2019-q-a"}, 503477}, + {{655173, "comedians-canaries-and-coalmines"}, 498586}, + {{655173, "the-democrats-apology-and-promise"}, 465433}, + {{655173, "jp-s4c-jodptn8"}, 539940}, + {{655173, "2014-personality-lecture-16-extraversion"}, 578465}, + {{655173, "dr-jordan-b-peterson-on-femsplainers"}, 490395}, + {{655173, "higher-ed-our-cultural-inflection-point"}, 527291}, + {{655173, "archetype-reality-friendship-and"}, 519736}, + {{655173, "sir-roger-scruton-dr-jordan-b-peterson"}, 490395}, + {{655173, "jp-cf2nqmqifxc"}, 539940}, + {{655173, "penguin-uk-12-rules-for-life"}, 413749}, + {{655173, "march-2019-q-and-a"}, 537138}, + {{655173, "jp-ne5vbomsqjc"}, 539940}, + {{655173, "dublin-london-harris-murray-new-usa-12"}, 413749}, + {{655173, "12-rules-12-cities-tickets-now-available"}, 413749}, + {{655173, "jp-j9j-bvdrgdi"}, 539940}, + {{655173, "responsibility-conscience-and-meaning"}, 499123}, + {{655173, "04-harris-murray-peterson-discussion"}, 436678}, + {{655173, "jp-ayhaz9k008q"}, 539940}, + {{655173, "with-jocko-willink-the-catastrophe-of"}, 490395}, + {{655173, "interview-with-the-grievance-studies"}, 501296}, + {{655173, "russell-brand-jordan-b-peterson-under"}, 413750}, + {{655173, "goodbye-to-patreon"}, 496771}, + {{655173, "revamped-podcast-announcement-with"}, 540943}, + {{655173, "swedes-want-to-know"}, 285453}, + {{655173, "auckland-clip-2-the-four-fundamental"}, 607892}, + {{655173, "jp-dtirzqmgbdm"}, 539940}, + {{655173, "political-correctness-a-force-for-good-a"}, 413750}, + {{655173, "sean-plunket-full-interview-new-zealand"}, 597638}, + {{655173, "q-a-the-meaning-and-reality-of"}, 616984}, + {{655173, "lecture-and-q-a-with-jordan-peterson-the"}, 413749}, + {{655173, "2017-personality-07-carl-jung-and-the"}, 578465}, + {{655173, "nina-paley-animator-extraordinaire"}, 413750}, + {{655173, "truth-as-the-antidote-to-suffering-with"}, 455127}, + {{655173, "bishop-barron-word-on-fire"}, 599814}, + {{655173, "zizek-vs-peterson-april-19"}, 527291}, + {{655173, "revamped-podcast-with-westwood-one"}, 540943}, + {{655173, "2016-11-19-university-of-toronto-free"}, 578465}, + {{655173, "jp-1emrmtrj5jc"}, 539940}, + {{655173, "who-is-joe-rogan-with-jordan-peterson"}, 585578}, + {{655173, "who-dares-say-he-believes-in-god"}, 581738}, + {{655252, "games-with-live2d"}, 589978}, + {{655252, "kaenbyou-rin-live2d"}, 589978}, + {{655374, "steam-groups-are-crazy"}, 607590}, + {{655379, "asmr-captain-falcon-happily-beats-you-up"}, 644574}, + {{655379, "pixel-art-series-5-link-holding-the"}, 442952}, + {{655379, "who-can-cross-the-planck-length-the-hero"}, 610830}, + {{655379, "ssbb-the-yoshi-grab-release-crash"}, 609747}, + {{655379, "tas-captain-falcon-s-bizarre-adventure"}, 442958}, + {{655379, "super-smash-bros-in-360-test"}, 442963}, + {{655379, "what-if-luigi-was-b-u-f-f"}, 442971}, + {{655803, "sun-time-lapse-test-7"}, 610634}, + {{655952, "upper-build-complete"}, 591728}, + {{656758, "cryptocurrency-awareness-adoption-the"}, 541770}, + {{656829, "3d-printing-technologies-comparison"}, 462685}, + {{656829, "3d-printing-for-everyone"}, 462685}, + {{657052, "tni-punya-ilmu-kanuragan-gaya-baru"}, 657045}, + {{657052, "papa-sunimah-nelpon-sri-utami-emon"}, 657045}, + {{657274, "rapforlife-4-win"}, 656856}, + {{657274, "bizzilion-proof-of-withdrawal"}, 656856}, + {{657420, "quick-drawing-prince-tribute-colored"}, 605630}, + {{657453, "white-boy-tom-mcdonald-facts"}, 597169}, + {{657453, "is-it-ok-to-look-when-you-with-your-girl"}, 610508}, + {{657584, "need-for-speed-ryzen-5-1600-gtx-1050-ti"}, 657161}, + {{657584, "quantum-break-ryzen-5-1600-gtx-1050-ti-4"}, 657161}, + {{657584, "nightcore-legends-never-die"}, 657161}, + {{657706, "mtb-enduro-ferragosto-2019-sestri"}, 638904}, + {{657706, "warface-free-for-all"}, 638908}, + {{657782, "nick-warren-at-loveland-but-not-really"}, 444299}, + {{658098, "le-temps-nous-glisse-entre-les-doigts"}, 600099}, +}; + +#endif // TAKEOVERWORKAROUNDS_H diff --git a/src/claimtrie/trie.cpp b/src/claimtrie/trie.cpp index 578080072..f20710cdd 100644 --- a/src/claimtrie/trie.cpp +++ b/src/claimtrie/trie.cpp @@ -7,11 +7,7 @@ #include #include #include -#include #include -#include - -#include #define logPrint CLogPrint::global() @@ -42,6 +38,15 @@ static const sqlite::sqlite_config sharedConfig { nullptr, sqlite::Encoding::UTF8 }; +void applyPragmas(sqlite::database& db, std::size_t cache) +{ + db << "PRAGMA cache_size=-" + std::to_string(cache); // in -KB + db << "PRAGMA synchronous=OFF"; // don't disk sync after transaction commit + db << "PRAGMA journal_mode=MEMORY"; + db << "PRAGMA temp_store=MEMORY"; + db << "PRAGMA case_sensitive_like=true"; +} + CClaimTrie::CClaimTrie(bool fWipe, int height, const std::string& dataDir, int nNormalizedNameForkHeight, @@ -91,11 +96,7 @@ CClaimTrie::CClaimTrie(bool fWipe, int height, db << "CREATE INDEX IF NOT EXISTS supports_expirationHeight ON supports (expirationHeight)"; db << "CREATE INDEX IF NOT EXISTS supports_nodeName ON supports (nodeName)"; - db << "PRAGMA cache_size=-" + std::to_string(5 * 1024); // in -KB - db << "PRAGMA synchronous=OFF"; // don't disk sync after transaction commit - db << "PRAGMA journal_mode=MEMORY"; - db << "PRAGMA temp_store=MEMORY"; - db << "PRAGMA case_sensitive_like=true"; + applyPragmas(db, std::size_t(5) * 1024); // in -KB if (fWipe) { db << "DELETE FROM nodes"; @@ -248,7 +249,7 @@ void CClaimTrieCacheBase::ensureTreeStructureIsUpToDate() auto insertQuery = db << "INSERT INTO nodes(name, parent, hash) VALUES(?, ?, NULL) " "ON CONFLICT(name) DO UPDATE SET parent = excluded.parent, hash = NULL"; - auto nodesQuery = db << "SELECT name FROM nodes WHERE parent = ? ORDER BY name"; + auto nodesQuery = db << "SELECT name FROM nodes WHERE parent = ?"; auto updateQuery = db << "UPDATE nodes SET parent = ? WHERE name = ?"; for (auto& name: names) { @@ -516,11 +517,7 @@ CClaimTrieCacheBase::CClaimTrieCacheBase(CClaimTrie* base) assert(base); nNextHeight = base->nNextHeight; - db << "PRAGMA cache_size=-" + std::to_string(200 * 1024); // in -KB - db << "PRAGMA synchronous=OFF"; // don't disk sync after transaction commit - db << "PRAGMA journal_mode=MEMORY"; - db << "PRAGMA temp_store=MEMORY"; - db << "PRAGMA case_sensitive_like=true"; + applyPragmas(db, std::size_t(200) * 1024); // in -KB db.define("SIZE", [](const std::string& s) -> int { return s.size(); }); db.define("POPS", [](std::string s) -> std::string { if (!s.empty()) s.pop_back(); return s; }); @@ -553,7 +550,7 @@ CUint256 CClaimTrieCacheBase::getMerkleHash() assert(transacting); // no data changed but we didn't have the root hash there already? auto updateQuery = db << "UPDATE nodes SET hash = ? WHERE name = ?"; db << "SELECT n.name, IFNULL((SELECT CASE WHEN t.claimID IS NULL THEN 0 ELSE t.height END FROM takeover t WHERE t.name = n.name " - "ORDER BY t.height DESC LIMIT 1), 0) FROM nodes n WHERE n.hash IS NULL ORDER BY n.name DESC" + "ORDER BY t.height DESC LIMIT 1), 0) FROM nodes n WHERE n.hash IS NULL ORDER BY SIZE(n.name) DESC" >> [this, &hash, &updateQuery](const std::string& name, int takeoverHeight) { hash = computeNodeHash(name, takeoverHeight); updateQuery << hash << name; @@ -566,7 +563,7 @@ CUint256 CClaimTrieCacheBase::getMerkleHash() bool CClaimTrieCacheBase::getLastTakeoverForName(const std::string& name, CUint160& claimId, int& takeoverHeight) const { auto query = db << "SELECT t.height, t.claimID FROM takeover t " - "WHERE t.name = ?2 ORDER BY t.height DESC LIMIT 1" << nNextHeight << name; + "WHERE t.name = ?1 ORDER BY t.height DESC LIMIT 1" << name; auto it = query.begin(); if (it != query.end()) { std::unique_ptr claimIdOrNull; @@ -684,451 +681,8 @@ bool CClaimTrieCacheBase::removeSupport(const CTxOutPoint& outPoint, std::string return true; } -static const boost::container::flat_map, int> takeoverWorkarounds = { - {{496856, "HunterxHunterAMV"}, 496835}, - {{542978, "namethattune1"}, 542429}, - {{543508, "namethattune-5"}, 543306}, - {{546780, "forecasts"}, 546624}, - {{548730, "forecasts"}, 546780}, - {{551540, "forecasts"}, 548730}, - {{552380, "chicthinkingofyou"}, 550804}, - {{560363, "takephotowithlbryteam"}, 559962}, - {{563710, "test-img"}, 563700}, - {{566750, "itila"}, 543261}, - {{567082, "malabarismo-com-bolas-de-futebol-vs-chap"}, 563592}, - {{596860, "180mphpullsthrougheurope"}, 596757}, - {{617743, "vaccines"}, 572756}, - {{619609, "copface-slamshandcuffedteengirlintoconcrete"}, 539940}, - {{620392, "banker-exposes-satanic-elite"}, 597788}, - {{624997, "direttiva-sulle-armi-ue-in-svizzera-di"}, 567908}, - {{624997, "best-of-apex"}, 585580}, - {{629970, "cannot-ignore-my-veins"}, 629914}, - {{633058, "bio-waste-we-programmed-your-brain"}, 617185}, - {{633601, "macrolauncher-overview-first-look"}, 633058}, - {{640186, "its-up-to-you-and-i-2019"}, 639116}, - {{640241, "tor-eas-3-20"}, 592645}, - {{640522, "seadoxdark"}, 619531}, - {{640617, "lbry-przewodnik-1-instalacja"}, 451186}, - {{640623, "avxchange-2019-the-next-netflix-spotify"}, 606790}, - {{640684, "algebra-introduction"}, 624152}, - {{640684, "a-high-school-math-teacher-does-a"}, 600885}, - {{640684, "another-random-life-update"}, 600884}, - {{640684, "who-is-the-taylor-series-for"}, 600882}, - {{640684, "tedx-talk-released"}, 612303}, - {{640730, "e-mental"}, 615375}, - {{641143, "amiga-1200-bespoke-virgin-cinema"}, 623542}, - {{641161, "dreamscape-432-omega"}, 618894}, - {{641162, "2019-topstone-carbon-force-etap-axs-bike"}, 639107}, - {{641186, "arin-sings-big-floppy-penis-live-jazz-2"}, 638904}, - {{641421, "edward-snowden-on-bitcoin-and-privacy"}, 522729}, - {{641421, "what-is-libra-facebook-s-new"}, 598236}, - {{641421, "what-are-stablecoins-counter-party-risk"}, 583508}, - {{641421, "anthony-pomp-pompliano-discusses-crypto"}, 564416}, - {{641421, "tim-draper-crypto-invest-summit-2019"}, 550329}, - {{641421, "mass-adoption-and-what-will-it-take-to"}, 549781}, - {{641421, "dragonwolftech-youtube-channel-trailer"}, 567128}, - {{641421, "naomi-brockwell-s-weekly-crypto-recap"}, 540006}, - {{641421, "blockchain-based-youtube-twitter"}, 580809}, - {{641421, "andreas-antonopoulos-on-privacy-privacy"}, 533522}, - {{641817, "mexico-submits-and-big-tech-worsens"}, 582977}, - {{641817, "why-we-need-travel-bans"}, 581354}, - {{641880, "censored-by-patreon-bitchute-shares"}, 482460}, - {{641880, "crypto-wonderland"}, 485218}, - {{642168, "1-diabolo-julio-cezar-16-cbmcp-freestyle"}, 374999}, - {{642314, "tough-students"}, 615780}, - {{642697, "gamercauldronep2"}, 642153}, - {{643406, "the-most-fun-i-ve-had-in-a-long-time"}, 616506}, - {{643893, "spitshine69-and-uk-freedom-audits"}, 616876}, - {{644480, "my-mum-getting-attacked-a-duck"}, 567624}, - {{644486, "the-cryptocurrency-experiment"}, 569189}, - {{644486, "tag-you-re-it"}, 558316}, - {{644486, "orange-county-mineral-society-rock-and"}, 397138}, - {{644486, "sampling-with-the-gold-rush-nugget"}, 527960}, - {{644562, "september-15-21-a-new-way-of-doing"}, 634792}, - {{644562, "july-week-3-collective-frequency-general"}, 607942}, - {{644562, "september-8-14-growing-up-general"}, 630977}, - {{644562, "august-4-10-collective-frequency-general"}, 612307}, - {{644562, "august-11-17-collective-frequency"}, 617279}, - {{644562, "september-1-7-gentle-wake-up-call"}, 627104}, - {{644607, "no-more-lol"}, 643497}, - {{644607, "minion-masters-who-knew"}, 641313}, - {{645236, "danganronpa-3-the-end-of-hope-s-peak"}, 644153}, - {{645348, "captchabot-a-discord-bot-to-protect-your"}, 592810}, - {{645701, "the-xero-hour-saint-greta-of-thunberg"}, 644081}, - {{645701, "batman-v-superman-theological-notions"}, 590189}, - {{645918, "emacs-is-great-ep-0-init-el-from-org"}, 575666}, - {{645918, "emacs-is-great-ep-1-packages"}, 575666}, - {{645918, "emacs-is-great-ep-40-pt-2-hebrew"}, 575668}, - {{645923, "nasal-snuff-review-osp-batch-2"}, 575658}, - {{645923, "why-bit-coin"}, 575658}, - {{645929, "begin-quest"}, 598822}, - {{645929, "filthy-foe"}, 588386}, - {{645929, "unsanitary-snow"}, 588386}, - {{645929, "famispam-1-music-box"}, 588386}, - {{645929, "running-away"}, 598822}, - {{645931, "my-beloved-chris-madsen"}, 589114}, - {{645931, "space-is-consciousness-chris-madsen"}, 589116}, - {{645947, "gasifier-rocket-stove-secondary-burn"}, 590595}, - {{645949, "mouse-razer-abyssus-v2-e-mousepad"}, 591139}, - {{645949, "pr-temporada-2018-league-of-legends"}, 591138}, - {{645949, "windows-10-build-9901-pt-br"}, 591137}, - {{645949, "abrindo-pacotes-do-festival-lunar-2018"}, 591139}, - {{645949, "unboxing-camisetas-personalizadas-play-e"}, 591138}, - {{645949, "abrindo-envelopes-do-festival-lunar-2017"}, 591138}, - {{645951, "grub-my-grub-played-guruku-tersayang"}, 618033}, - {{645951, "ismeeltimepiece"}, 618038}, - {{645951, "thoughts-on-doom"}, 596485}, - {{645951, "thoughts-on-god-of-war-about-as-deep-as"}, 596485}, - {{645956, "linux-lite-3-6-see-what-s-new"}, 645195}, - {{646191, "kahlil-gibran-the-prophet-part-1"}, 597637}, - {{646551, "crypto-market-crash-should-you-sell-your"}, 442613}, - {{646551, "live-crypto-trading-and-market-analysis"}, 442615}, - {{646551, "5-reasons-trading-is-always-better-than"}, 500850}, - {{646551, "digitex-futures-dump-panic-selling-or"}, 568065}, - {{646552, "how-to-install-polarr-on-kali-linux-bynp"}, 466235}, - {{646586, "electoral-college-kids-civics-lesson"}, 430818}, - {{646602, "grapes-full-90-minute-watercolour"}, 537108}, - {{646602, "meizu-mx4-the-second-ubuntu-phone"}, 537109}, - {{646609, "how-to-set-up-the-ledger-nano-x"}, 569992}, - {{646609, "how-to-buy-ethereum"}, 482354}, - {{646609, "how-to-install-setup-the-exodus-multi"}, 482356}, - {{646609, "how-to-manage-your-passwords-using"}, 531987}, - {{646609, "cryptodad-s-live-q-a-friday-may-3rd-2019"}, 562303}, - {{646638, "resident-evil-ada-chapter-5-final"}, 605612}, - {{646639, "taurus-june-2019-career-love-tarot"}, 586910}, - {{646652, "digital-bullpen-ep-5-building-a-digital"}, 589274}, - {{646661, "sunlight"}, 591076}, - {{646661, "grasp-lab-nasa-open-mct-series"}, 589414}, - {{646663, "bunnula-s-creepers-tim-pool-s-beanie-a"}, 599669}, - {{646663, "bunnula-music-hey-ya-by-outkast"}, 605685}, - {{646663, "bunnula-tv-s-music-television-eunoia"}, 644437}, - {{646663, "the-pussy-centipede-40-sneakers-and"}, 587265}, - {{646663, "bunnula-reacts-ashton-titty-whitty"}, 596988}, - {{646677, "filip-reviews-jeromes-dream-cataracts-so"}, 589751}, - {{646691, "fascism-and-its-mobilizing-passions"}, 464342}, - {{646692, "hsb-color-layers-action-for-adobe"}, 586533}, - {{646692, "master-colorist-action-pack-extracting"}, 631830}, - {{646693, "how-to-protect-your-garden-from-animals"}, 588476}, - {{646693, "gardening-for-the-apocalypse-epic"}, 588472}, - {{646693, "my-first-bee-hive-foundationless-natural"}, 588469}, - {{646693, "dragon-fruit-and-passion-fruit-planting"}, 588470}, - {{646693, "installing-my-first-foundationless"}, 588469}, - {{646705, "first-naza-fpv"}, 590411}, - {{646717, "first-burning-man-2019-detour-034"}, 630247}, - {{646717, "why-bob-marley-was-an-idiot-test-driving"}, 477558}, - {{646717, "we-are-addicted-to-gambling-ufc-207-w"}, 481398}, - {{646717, "ghetto-swap-meet-selling-storage-lockers"}, 498291}, - {{646738, "1-kings-chapter-7-summary-and-what-god"}, 586599}, - {{646814, "brand-spanking-new-junior-high-school"}, 592378}, - {{646814, "lupe-fiasco-freestyle-at-end-of-the-weak"}, 639535}, - {{646824, "how-to-one-stroke-painting-doodles-mixed"}, 592404}, - {{646824, "acrylic-pouring-landscape-with-a-tree"}, 592404}, - {{646824, "how-to-make-a-diy-concrete-paste-planter"}, 595976}, - {{646824, "how-to-make-a-rustic-sand-planter-sand"}, 592404}, - {{646833, "3-day-festival-at-the-galilee-lake-and"}, 592842}, - {{646833, "rainbow-circle-around-the-noon-sun-above"}, 592842}, - {{646833, "energetic-self-control-demonstration"}, 623811}, - {{646833, "bees-congregating"}, 592842}, - {{646856, "formula-offroad-honefoss-sunday-track2"}, 592872}, - {{646862, "h3video1-dc-vs-mb-1"}, 593237}, - {{646862, "h3video1-iwasgoingto-load-up-gmod-but"}, 593237}, - {{646883, "watch-this-game-developer-make-a-video"}, 592593}, - {{646883, "how-to-write-secure-javascript"}, 592593}, - {{646883, "blockchain-technology-explained-2-hour"}, 592593}, - {{646888, "fl-studio-bits"}, 608155}, - {{646914, "andy-s-shed-live-s03e02-the-longest"}, 592200}, - {{646914, "gpo-telephone-776-phone-restoration"}, 592201}, - {{646916, "toxic-studios-co-stream-pubg"}, 597126}, - {{646916, "hyperlapse-of-prague-praha-from-inside"}, 597109}, - {{646933, "videobits-1"}, 597378}, - {{646933, "clouds-developing-daytime-8"}, 597378}, - {{646933, "slechtvalk-in-watertoren-bodegraven"}, 597378}, - {{646933, "timelapse-maansverduistering-16-juli"}, 605880}, - {{646933, "startrails-27"}, 597378}, - {{646933, "passing-clouds-daytime-3"}, 597378}, - {{646940, "nerdgasm-unboxing-massive-playing-cards"}, 597421}, - {{646946, "debunking-cops-volume-3-the-murder-of"}, 630570}, - {{646961, "kingsong-ks16x-electric-unicycle-250km"}, 636725}, - {{646968, "wild-mountain-goats-amazing-rock"}, 621940}, - {{646968, "no-shelter-backcountry-camping-in"}, 621940}, - {{646968, "can-i-live-in-this-through-winter-lets"}, 645750}, - {{646968, "why-i-wear-a-chest-rig-backcountry-or"}, 621940}, - {{646989, "marc-ivan-o-gorman-promo-producer-editor"}, 645656}, - {{647045, "@moraltis"}, 646367}, - {{647045, "moraltis-twitch-highlights-first-edit"}, 646368}, - {{647075, "the-3-massive-tinder-convo-mistakes"}, 629464}, - {{647075, "how-to-get-friend-zoned-via-text"}, 592298}, - {{647075, "don-t-do-this-on-tinder"}, 624591}, - {{647322, "world-of-tanks-7-kills"}, 609905}, - {{647322, "the-tier-6-auto-loading-swedish-meatball"}, 591338}, - {{647416, "hypnotic-soundscapes-garden-of-the"}, 596923}, - {{647416, "hypnotic-soundscapes-the-cauldron-sacred"}, 596928}, - {{647416, "schumann-resonance-to-theta-sweep"}, 596920}, - {{647416, "conversational-indirect-hypnosis-why"}, 596913}, - {{647493, "mimirs-brunnr"}, 590498}, - {{648143, "live-ita-completiamo-the-evil-within-2"}, 646568}, - {{648203, "why-we-love-people-that-hurt-us"}, 591128}, - {{648203, "i-didn-t-like-my-baby-and-considered"}, 591128}, - {{648220, "trade-talk-001-i-m-a-vlogger-now-fielder"}, 597303}, - {{648220, "vise-restoration-record-no-6-vise"}, 597303}, - {{648540, "amv-reign"}, 571863}, - {{648540, "amv-virus"}, 571863}, - {{648588, "audial-drift-(a-journey-into-sound)"}, 630217}, - {{648616, "quick-zbrush-tip-transpose-master-scale"}, 463205}, - {{648616, "how-to-create-3d-horns-maya-to-zbrush-2"}, 463205}, - {{648815, "arduino-based-cartridge-game-handheld"}, 593252}, - {{648815, "a-maze-update-3-new-game-modes-amazing"}, 593252}, - {{649209, "denmark-trip"}, 591428}, - {{649209, "stunning-4k-drone-footage"}, 591428}, - {{649215, "how-to-create-a-channel-and-publish-a"}, 414908}, - {{649215, "lbryclass-11-how-to-get-your-deposit"}, 632420}, - {{649543, "spring-break-madness-at-universal"}, 599698}, - {{649921, "navegador-brave-navegador-da-web-seguro"}, 649261}, - {{650191, "stream-intro"}, 591301}, - {{650946, "platelet-chan-fan-art"}, 584601}, - {{650946, "aqua-fanart"}, 584601}, - {{650946, "virginmedia-stores-password-in-plain"}, 619537}, - {{650946, "running-linux-on-android-teaser"}, 604441}, - {{650946, "hatsune-miku-ievan-polka"}, 600126}, - {{650946, "digital-security-and-privacy-2-and-a-new"}, 600135}, - {{650993, "my-editorial-comment-on-recent-youtube"}, 590305}, - {{650993, "drive-7-18-2018"}, 590305}, - {{651011, "old-world-put-on-realm-realms-gg"}, 591899}, - {{651011, "make-your-own-soundboard-with-autohotkey"}, 591899}, - {{651011, "ark-survival-https-discord-gg-ad26xa"}, 637680}, - {{651011, "minecraft-featuring-seus-8-just-came-4"}, 596488}, - {{651057, "found-footage-bikinis-at-the-beach-with"}, 593586}, - {{651057, "found-footage-sexy-mom-a-mink-stole"}, 593586}, - {{651067, "who-are-the-gentiles-gomer"}, 597094}, - {{651067, "take-back-the-kingdom-ep-2-450-million"}, 597094}, - {{651067, "mmxtac-implemented-footstep-sounds-and"}, 597094}, - {{651067, "dynasoul-s-blender-to-unreal-animated"}, 597094}, - {{651103, "calling-a-scammer-syntax-error"}, 612532}, - {{651103, "quick-highlight-of-my-day"}, 647651}, - {{651103, "calling-scammers-and-singing-christmas"}, 612531}, - {{651109, "@livingtzm"}, 637322}, - {{651109, "living-tzm-juuso-from-finland-september"}, 643412}, - {{651373, "se-voc-rir-ou-sorrir-reinicie-o-v-deo"}, 649302}, - {{651476, "what-is-pagan-online-polished-new-arpg"}, 592157}, - {{651476, "must-have-elder-scrolls-online-addons"}, 592156}, - {{651476, "who-should-play-albion-online"}, 592156}, - {{651730, "person-detection-with-keras-tensorflow"}, 621276}, - {{651730, "youtube-censorship-take-two"}, 587249}, - {{651730, "new-red-tail-shark-and-two-silver-sharks"}, 587251}, - {{651730, "around-auckland"}, 587250}, - {{651730, "humanism-in-islam"}, 587250}, - {{651730, "tigers-at-auckland-zoo"}, 587250}, - {{651730, "gravity-demonstration"}, 587250}, - {{651730, "copyright-question"}, 587249}, - {{651730, "uberg33k-the-ultimate-software-developer"}, 599522}, - {{651730, "chl-e-swarbrick-auckland-mayoral"}, 587250}, - {{651730, "code-reviews"}, 587249}, - {{651730, "raising-robots"}, 587251}, - {{651730, "teaching-python"}, 587250}, - {{651730, "kelly-tarlton-2016"}, 587250}, - {{652172, "where-is-everything"}, 589491}, - {{652172, "some-guy-and-his-camera"}, 617062}, - {{652172, "practical-information-pt-1"}, 589491}, - {{652172, "latent-vibrations"}, 589491}, - {{652172, "maldek-compilation"}, 589491}, - {{652444, "thank-you-etika-thank-you-desmond"}, 652121}, - {{652611, "plants-vs-zombies-gw2-20190827183609"}, 624339}, - {{652611, "wolfenstein-the-new-order-playthrough-6"}, 650299}, - {{652887, "a-codeigniter-cms-open-source-download"}, 652737}, - {{652966, "@pokesadventures"}, 632391}, - {{653009, "flat-earth-uk-convention-is-a-bust"}, 585786}, - {{653009, "flat-earth-reset-flat-earth-money-tree"}, 585786}, - {{653011, "veil-of-thorns-dispirit-brutal-leech-3"}, 652475}, - {{653069, "being-born-after-9-11"}, 632218}, - {{653069, "8-years-on-youtube-what-it-has-done-for"}, 637130}, - {{653069, "answering-questions-how-original"}, 521447}, - {{653069, "talking-about-my-first-comedy-stand-up"}, 583450}, - {{653069, "doing-push-ups-in-public"}, 650920}, - {{653069, "vlog-extra"}, 465997}, - {{653069, "crying-myself"}, 465997}, - {{653069, "xbox-rejection"}, 465992}, - {{653354, "msps-how-to-find-a-linux-job-where-no"}, 642537}, - {{653354, "windows-is-better-than-linux-vlog-it-and"}, 646306}, - {{653354, "luke-smith-is-wrong-about-everything"}, 507717}, - {{653354, "advice-for-those-starting-out-in-tech"}, 612452}, - {{653354, "treating-yourself-to-make-studying-more"}, 623561}, - {{653354, "lpi-linux-essential-dns-tools-vlog-what"}, 559464}, - {{653354, "is-learning-linux-worth-it-in-2019-vlog"}, 570886}, - {{653354, "huawei-linux-and-cellphones-in-2019-vlog"}, 578501}, - {{653354, "how-to-use-webmin-to-manage-linux"}, 511507}, - {{653354, "latency-concurrency-and-the-best-value"}, 596857}, - {{653354, "how-to-use-the-pomodoro-method-in-it"}, 506632}, - {{653354, "negotiating-compensation-vlog-it-and"}, 542317}, - {{653354, "procedural-goals-vs-outcome-goals-vlog"}, 626785}, - {{653354, "intro-to-raid-understanding-how-raid"}, 529341}, - {{653354, "smokeping"}, 574693}, - {{653354, "richard-stallman-should-not-be-fired"}, 634928}, - {{653354, "unusual-or-specialty-certifications-vlog"}, 620146}, - {{653354, "gratitude-and-small-projects-vlog-it"}, 564900}, - {{653354, "why-linux-on-the-smartphone-is-important"}, 649543}, - {{653354, "opportunity-costs-vlog-it-devops-career"}, 549708}, - {{653354, "double-giveaway-lpi-class-dates-and"}, 608129}, - {{653354, "linux-on-the-smartphone-in-2019-librem"}, 530426}, - {{653524, "celtic-folk-music-full-live-concert-mps"}, 589762}, - {{653745, "aftermath-of-the-mac"}, 592768}, - {{653745, "b-c-a-glock-17-threaded-barrel"}, 592770}, - {{653800, "middle-earth-shadow-of-mordor-by"}, 590229}, - {{654079, "tomand-jeremy-chirs45"}, 614296}, - {{654096, "achamos-carteira-com-grana-olha-o-que"}, 466262}, - {{654096, "viagem-bizarra-e-cansativa-ao-nordeste"}, 466263}, - {{654096, "tedio-na-tailandia-limpeza-de-area"}, 466265}, - {{654425, "schau-bung-2014-in-windischgarsten"}, 654410}, - {{654425, "mitternachtseinlage-ball-rk"}, 654410}, - {{654425, "zugabe-ball-rk-windischgarsten"}, 654412}, - {{654722, "skytrain-in-korea"}, 463145}, - {{654722, "luwak-coffee-the-shit-coffee"}, 463155}, - {{654722, "puppet-show-in-bangkok-thailand"}, 462812}, - {{654722, "kyaito-market-myanmar"}, 462813}, - {{654724, "wipeout-zombies-bo3-custom-zombies-1st"}, 589569}, - {{654724, "the-street-bo3-custom-zombies"}, 589544}, - {{654880, "wwii-airsoft-pow"}, 586968}, - {{654880, "dueling-geese-fight-to-the-death"}, 586968}, - {{654880, "wwii-airsoft-torgau-raw-footage-part4"}, 586968}, - {{655173, "april-2019-q-and-a"}, 554032}, - {{655173, "the-meaning-and-reality-of-individual"}, 607892}, - {{655173, "steven-pinker-progress-despite"}, 616984}, - {{655173, "we-make-stories-out-of-totem-poles"}, 549090}, - {{655173, "jamil-jivani-author-of-why-young-men"}, 542035}, - {{655173, "commentaries-on-jb-peterson-rebel-wisdom"}, 528898}, - {{655173, "auckland-clip-4-on-cain-and-abel"}, 629242}, - {{655173, "peterson-vs-zizek-livestream-tickets"}, 545285}, - {{655173, "auckland-clip-3-the-dawning-of-the-moral"}, 621154}, - {{655173, "religious-belief-and-the-enlightenment"}, 606269}, - {{655173, "auckland-lc-highlight-1-the-presumption"}, 565783}, - {{655173, "q-a-sir-roger-scruton-dr-jordan-b"}, 544184}, - {{655173, "cancellation-polish-national-foundation"}, 562529}, - {{655173, "the-coddling-of-the-american-mind-haidt"}, 440185}, - {{655173, "02-harris-weinstein-peterson-discussion"}, 430896}, - {{655173, "jordan-peterson-threatens-everything-of"}, 519737}, - {{655173, "on-claiming-belief-in-god-commentary"}, 581738}, - {{655173, "how-to-make-the-world-better-really-with"}, 482317}, - {{655173, "quillette-discussion-with-founder-editor"}, 413749}, - {{655173, "jb-peterson-on-free-thought-and-speech"}, 462849}, - {{655173, "marxism-zizek-peterson-official-video"}, 578453}, - {{655173, "patreon-problem-solution-dave-rubin-dr"}, 490394}, - {{655173, "next-week-st-louis-salt-lake-city"}, 445933}, - {{655173, "conversations-with-john-anderson-jordan"}, 529981}, - {{655173, "nz-australia-12-rules-tour-next-2-weeks"}, 518649}, - {{655173, "a-call-to-rebellion-for-ontario-legal"}, 285451}, - {{655173, "2016-personality-lecture-12"}, 578465}, - {{655173, "on-the-vital-necessity-of-free-speech"}, 427404}, - {{655173, "2017-01-23-social-justice-freedom-of"}, 578465}, - {{655173, "discussion-sam-harris-the-idw-and-the"}, 423332}, - {{655173, "march-2018-patreon-q-a"}, 413749}, - {{655173, "take-aim-even-badly"}, 490395}, - {{655173, "jp-f-wwbgo6a2w"}, 539940}, - {{655173, "patreon-account-deletion"}, 503477}, - {{655173, "canada-us-europe-tour-august-dec-2018"}, 413749}, - {{655173, "leaders-myth-reality-general-stanley"}, 514333}, - {{655173, "jp-ifi5kkxig3s"}, 539940}, - {{655173, "documentary-a-glitch-in-the-matrix-david"}, 413749}, - {{655173, "2017-08-14-patreon-q-and-a"}, 285451}, - {{655173, "postmodernism-history-and-diagnosis"}, 285451}, - {{655173, "23-minutes-from-maps-of-meaning-the"}, 413749}, - {{655173, "milo-forbidden-conversation"}, 578493}, - {{655173, "jp-wnjbasba-qw"}, 539940}, - {{655173, "uk-12-rules-tour-october-and-november"}, 462849}, - {{655173, "2015-maps-of-meaning-10-culture-anomaly"}, 578465}, - {{655173, "ayaan-hirsi-ali-islam-mecca-vs-medina"}, 285452}, - {{655173, "jp-f9393el2z1i"}, 539940}, - {{655173, "campus-indoctrination-the-parasitization"}, 285453}, - {{655173, "jp-owgc63khcl8"}, 539940}, - {{655173, "the-death-and-resurrection-of-christ-a"}, 413749}, - {{655173, "01-harris-weinstein-peterson-discussion"}, 430896}, - {{655173, "enlightenment-now-steven-pinker-jb"}, 413749}, - {{655173, "the-lindsay-shepherd-affair-update"}, 413749}, - {{655173, "jp-g3fwumq5k8i"}, 539940}, - {{655173, "jp-evvs3l-abv4"}, 539940}, - {{655173, "former-australian-deputy-pm-john"}, 413750}, - {{655173, "message-to-my-korean-readers-90-seconds"}, 477424}, - {{655173, "jp--0xbomwjkgm"}, 539940}, - {{655173, "ben-shapiro-jordan-peterson-and-a-12"}, 413749}, - {{655173, "jp-91jwsb7zyhw"}, 539940}, - {{655173, "deconstruction-the-lindsay-shepherd"}, 299272}, - {{655173, "september-patreon-q-a"}, 285451}, - {{655173, "jp-2c3m0tt5kce"}, 539940}, - {{655173, "australia-s-john-anderson-dr-jordan-b"}, 413749}, - {{655173, "jp-hdrlq7dpiws"}, 539940}, - {{655173, "stephen-hicks-postmodernism-reprise"}, 578480}, - {{655173, "october-patreon-q-a"}, 285451}, - {{655173, "an-animated-intro-to-truth-order-and"}, 413749}, - {{655173, "jp-bsh37-x5rny"}, 539940}, - {{655173, "january-2019-q-a"}, 503477}, - {{655173, "comedians-canaries-and-coalmines"}, 498586}, - {{655173, "the-democrats-apology-and-promise"}, 465433}, - {{655173, "jp-s4c-jodptn8"}, 539940}, - {{655173, "2014-personality-lecture-16-extraversion"}, 578465}, - {{655173, "dr-jordan-b-peterson-on-femsplainers"}, 490395}, - {{655173, "higher-ed-our-cultural-inflection-point"}, 527291}, - {{655173, "archetype-reality-friendship-and"}, 519736}, - {{655173, "sir-roger-scruton-dr-jordan-b-peterson"}, 490395}, - {{655173, "jp-cf2nqmqifxc"}, 539940}, - {{655173, "penguin-uk-12-rules-for-life"}, 413749}, - {{655173, "march-2019-q-and-a"}, 537138}, - {{655173, "jp-ne5vbomsqjc"}, 539940}, - {{655173, "dublin-london-harris-murray-new-usa-12"}, 413749}, - {{655173, "12-rules-12-cities-tickets-now-available"}, 413749}, - {{655173, "jp-j9j-bvdrgdi"}, 539940}, - {{655173, "responsibility-conscience-and-meaning"}, 499123}, - {{655173, "04-harris-murray-peterson-discussion"}, 436678}, - {{655173, "jp-ayhaz9k008q"}, 539940}, - {{655173, "with-jocko-willink-the-catastrophe-of"}, 490395}, - {{655173, "interview-with-the-grievance-studies"}, 501296}, - {{655173, "russell-brand-jordan-b-peterson-under"}, 413750}, - {{655173, "goodbye-to-patreon"}, 496771}, - {{655173, "revamped-podcast-announcement-with"}, 540943}, - {{655173, "swedes-want-to-know"}, 285453}, - {{655173, "auckland-clip-2-the-four-fundamental"}, 607892}, - {{655173, "jp-dtirzqmgbdm"}, 539940}, - {{655173, "political-correctness-a-force-for-good-a"}, 413750}, - {{655173, "sean-plunket-full-interview-new-zealand"}, 597638}, - {{655173, "q-a-the-meaning-and-reality-of"}, 616984}, - {{655173, "lecture-and-q-a-with-jordan-peterson-the"}, 413749}, - {{655173, "2017-personality-07-carl-jung-and-the"}, 578465}, - {{655173, "nina-paley-animator-extraordinaire"}, 413750}, - {{655173, "truth-as-the-antidote-to-suffering-with"}, 455127}, - {{655173, "bishop-barron-word-on-fire"}, 599814}, - {{655173, "zizek-vs-peterson-april-19"}, 527291}, - {{655173, "revamped-podcast-with-westwood-one"}, 540943}, - {{655173, "2016-11-19-university-of-toronto-free"}, 578465}, - {{655173, "jp-1emrmtrj5jc"}, 539940}, - {{655173, "who-is-joe-rogan-with-jordan-peterson"}, 585578}, - {{655173, "who-dares-say-he-believes-in-god"}, 581738}, - {{655252, "games-with-live2d"}, 589978}, - {{655252, "kaenbyou-rin-live2d"}, 589978}, - {{655374, "steam-groups-are-crazy"}, 607590}, - {{655379, "asmr-captain-falcon-happily-beats-you-up"}, 644574}, - {{655379, "pixel-art-series-5-link-holding-the"}, 442952}, - {{655379, "who-can-cross-the-planck-length-the-hero"}, 610830}, - {{655379, "ssbb-the-yoshi-grab-release-crash"}, 609747}, - {{655379, "tas-captain-falcon-s-bizarre-adventure"}, 442958}, - {{655379, "super-smash-bros-in-360-test"}, 442963}, - {{655379, "what-if-luigi-was-b-u-f-f"}, 442971}, - {{655803, "sun-time-lapse-test-7"}, 610634}, - {{655952, "upper-build-complete"}, 591728}, - {{656758, "cryptocurrency-awareness-adoption-the"}, 541770}, - {{656829, "3d-printing-technologies-comparison"}, 462685}, - {{656829, "3d-printing-for-everyone"}, 462685}, - {{657052, "tni-punya-ilmu-kanuragan-gaya-baru"}, 657045}, - {{657052, "papa-sunimah-nelpon-sri-utami-emon"}, 657045}, - {{657274, "rapforlife-4-win"}, 656856}, - {{657274, "bizzilion-proof-of-withdrawal"}, 656856}, - {{657420, "quick-drawing-prince-tribute-colored"}, 605630}, - {{657453, "white-boy-tom-mcdonald-facts"}, 597169}, - {{657453, "is-it-ok-to-look-when-you-with-your-girl"}, 610508}, - {{657584, "need-for-speed-ryzen-5-1600-gtx-1050-ti"}, 657161}, - {{657584, "quantum-break-ryzen-5-1600-gtx-1050-ti-4"}, 657161}, - {{657584, "nightcore-legends-never-die"}, 657161}, - {{657706, "mtb-enduro-ferragosto-2019-sestri"}, 638904}, - {{657706, "warface-free-for-all"}, 638908}, - {{657782, "nick-warren-at-loveland-but-not-really"}, 444299}, - {{658098, "le-temps-nous-glisse-entre-les-doigts"}, 600099}, -}; +// hardcoded claims that should trigger a takeover +#include bool CClaimTrieCacheBase::incrementBlock() { @@ -1162,7 +716,7 @@ bool CClaimTrieCacheBase::incrementBlock() int existingHeight = 0; auto hasCurrentWinner = getLastTakeoverForName(nameWithTakeover, existingID, existingHeight); // we have a takeover if we had a winner and its changing or we never had a winner - auto takeoverHappening = (hasCandidate && !hasCurrentWinner) || (hasCurrentWinner && existingID != candidateValue.claimId); + auto takeoverHappening = !hasCandidate || !hasCurrentWinner || existingID != candidateValue.claimId; if (takeoverHappening && activateAllFor(nameWithTakeover)) hasCandidate = getInfoForName(nameWithTakeover, candidateValue, 1); diff --git a/src/claimtrie/trie.h b/src/claimtrie/trie.h index ea085cbb3..2951a879a 100644 --- a/src/claimtrie/trie.h +++ b/src/claimtrie/trie.h @@ -7,7 +7,6 @@ #include #include -#include #include #include #include