transfer300.pizza#71,412,892brc-20minting-claim#66,214,816orc-20Inscription #61594950#61,594,950htmlInscription #60758428#60,758,428htmlmint1,000.dada#46,054,319brc-20mint1,000.dada#46,054,311brc-20mint1,000.dada#46,054,308brc-20mint1,000.dada#46,054,303brc-20mint1,000.dada#46,054,291brc-20mint1,000.dada#46,054,284brc-20mint1,000.dada#46,054,275brc-20mint1,000.dada#46,054,257brc-20mint1,000.dada#46,054,256brc-20mint1,000.dada#46,054,250brc-20mint1,000.dada#46,054,228brc-20mint1,000.dada#46,054,223brc-20mint1,000.dada#46,054,221brc-20mint1,000.dada#46,054,207brc-20mint1,000.dada#46,054,199brc-20mint1,000.dada#46,054,166brc-20mint1,000.dada#46,054,162brc-20mint1,000.dada#46,054,122brc-20mint1,000.dada#46,054,118brc-20mint1,000.dada#46,054,102brc-20mint1,000.dada#46,054,083brc-20mint1,000.dada#46,054,069brc-20mint1,000.dada#46,054,057brc-20mint1,000.dada#46,054,056brc-20 let info = server.index.info().unwrap(); assert_eq!(info.transactions.len(), 1); assert_eq!(info.transactions[0].starting_block_count, 0); server.index.update().unwrap(); assert_eq!(server.index.statistic(crate::index::Statistic::Commits), 1); let info = server.index.info().unwrap(); assert_eq!(info.transactions.len(), 1); assert_eq!(info.transactions[0].starting_block_count, 0); server.mine_blocks(1); thread::sleep(Duration::from_millis(10)); server.index.update().unwrap(); assert_eq!(server.index.statistic(crate::index::Statistic::Commits), 2); let info = server.index.info().unwrap(); assert_eq!(info.transactions.len(), 2); assert_eq!(info.transactions[0].starting_block_count, 0); assert_eq!(info.transactions[1].starting_block_count, 1); assert!( info.transactions[1].starting_timestamp - info.transactions[0].starting_timestamp >= 10 ); } #[test] fn outputs_traversed_are_tracked() { let server = TestServer::new_with_sat_index();#44,981,826text StatusCode::OK, r".*<dt>sat</dt>\s*<dd><a href=/sat/5000000000>5000000000</a></dd>\s*<dt>preview</dt>.*", ); } #[test] fn inscription_page_does_not_have_sat_when_sats_are_not_tracked() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0, inscription("text/foo", "hello").to_witness())], ..Default::default() }); server.mine_blocks(1); server.assert_response_regex( format!("/inscription/{}", InscriptionId { txid, index: 0 }), StatusCode::OK, r".*<dt>output value</dt>\s*<dd>5000000000</dd>\s*<dt>preview</dt>.*", ); } #[test] fn strict_transport_security_header_is_set() { assert_eq!( TestServer::new() .get("/status") .headers() .get(header::STRICT_TRANSPORT_SECURITY) .unwrap(), "max-age=31536000; includeSubDomains; preload", ); } #[test] fn feed() { let server = TestServer::new_with_regtest_with_index_sats(); #44,981,815text #[test] fn unknown_preview() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0, inscription("text/foo", "hello").to_witness())], ..Default::default() }); server.mine_blocks(1); server.assert_response_csp( format!("/preview/{}", InscriptionId { txid, index: 0 }), StatusCode::OK, "default-src 'self'", fs::read_to_string("templates/preview-unknown.html").unwrap(), ); } #[test] fn video_preview() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0, inscription("video/webm", "hello").to_witness())], ..Default::default() }); let inscription_id = InscriptionId { txid, index: 0 }; server.mine_blocks(1); server.assert_response_regex( format!("/preview/{inscription_id}"), StatusCode::OK,#44,981,812text#!/usr/bin/env bash set -euxo pipefail systemctl stop ord-dev rm -rf /var/lib/ord-dev journalctl --unit ord-dev --rotate journalctl --unit ord-dev --vacuum-time 1s ./bin/update-dev-server #44,981,801text server.assert_response_regex( format!("/preview/{inscription_id}"), StatusCode::OK, format!(r".*<audio .*>\s*<source src=/content/{inscription_id}>.*"), ); } #[test] fn font_preview() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0, inscription("font/ttf", "hello").to_witness())], ..Default::default() }); let inscription_id = InscriptionId { txid, index: 0 }; server.mine_blocks(1); server.assert_response_regex( format!("/preview/{inscription_id}"), StatusCode::OK, format!(r".*src: url\(/content/{inscription_id}\).*"), ); } #[test] fn pdf_preview() { let server = TestServer::new_with_regtest(); server.mine_blocks(1); let txid = server.bitcoin_rpc_server.broadcast_tx(TransactionTemplate { inputs: &[( 1, 0, 0, inscription("application/pdf", "hello").to_witness(),#44,981,797text TestServer::new_with_sat_index().assert_response_regex( "/sat/0", StatusCode::OK, ".*>4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0:0<.*", ); } #[test] fn dont_show_rare_txt_in_header_without_sat_index() { TestServer::new().assert_response_regex( "/", StatusCode::OK, ".* <a href=/clock title=clock>.*</a> <a href=https://docs.ordinals.com/.*", ); } #[test] fn input() { TestServer::new().assert_response_regex( "/input/0/0/0", StatusCode::OK, ".*<title>Input /0/0/0</title>.*<h1>Input /0/0/0</h1>.*<dt>text</dt><dd>.*The Times 03/Jan/2009 Chancellor on brink of second bailout for banks</dd>.*", ); } #[test] fn input_missing() { TestServer::new().assert_response( "/input/1/1/1", StatusCode::NOT_FOUND, "input /1/1/1 not found", ); } #[test] fn commits_are_tracked() { let server = TestServer::new(); thread::sleep(Duration::from_millis(100)); assert_eq!(server.index.statistic(crate::index::Statistic::Commits), 1); #44,981,785textInscription #42726050#42,726,050pngInscription #42725956#42,725,956pngInscription #42725950#42,725,950pngInscription #42725900#42,725,900pngInscription #42725897#42,725,897pngInscription #42725766#42,725,766pngInscription #42725765#42,725,765pngmint69,420.p5js#40,358,563brc-20mint69,420.p5js#40,358,561brc-20mint69,420.p5js#40,358,560brc-20mint69,420.p5js#40,358,556brc-20mint69,420.p5js#40,358,552brc-20mint69,420.p5js#40,358,550brc-20mint69,420.p5js#40,358,549brc-20mint69,420.p5js#40,358,547brc-20mint69,420.p5js#40,358,546brc-20mint69,420.p5js#40,358,545brc-20mint69,420.p5js#40,358,538brc-20mint69,420.p5js#40,358,533brc-20mint69,420.p5js#40,358,531brc-20mint69,420.p5js#40,358,523brc-20mint69,420.p5js#40,358,520brc-20mint69,420.p5js#40,358,517brc-20mint69,420.p5js#40,358,516brc-20mint69,420.p5js#40,358,514brc-20mint69,420.p5js#40,358,513brc-20