-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathblockchain.sql
More file actions
153 lines (124 loc) · 4.6 KB
/
blockchain.sql
File metadata and controls
153 lines (124 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
-- phpMyAdmin SQL Dump
-- version 3.5.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 07, 2013 at 10:37 PM
-- Server version: 5.1.66-MariaDB
-- PHP Version: 5.3.22
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `blockchain`
--
-- --------------------------------------------------------
--
-- Table structure for table `addr_tx`
--
CREATE TABLE IF NOT EXISTS `addr_tx` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`address` varchar(34) COLLATE utf8_unicode_ci NOT NULL,
`tx_ref` char(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10120 ;
-- --------------------------------------------------------
--
-- Table structure for table `blocks`
--
CREATE TABLE IF NOT EXISTS `blocks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hash` char(64) COLLATE utf8_unicode_ci NOT NULL,
`confirmations` int(11) NOT NULL,
`size` int(11) NOT NULL,
`height` int(11) NOT NULL,
`version` int(11) NOT NULL,
`merkleroot` char(64) COLLATE utf8_unicode_ci NOT NULL,
`time` int(11) NOT NULL,
`nonce` int(11) NOT NULL,
`bits` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
`difficulty` double NOT NULL,
`previousblockhash` char(64) COLLATE utf8_unicode_ci NOT NULL,
`nextblockhash` char(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `hash` (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10001 ;
-- --------------------------------------------------------
--
-- Table structure for table `tx`
--
CREATE TABLE IF NOT EXISTS `tx` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`height` int(11) NOT NULL,
`tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10093 ;
-- --------------------------------------------------------
--
-- Table structure for table `tx_detail`
--
CREATE TABLE IF NOT EXISTS `tx_detail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hex` text COLLATE utf8_unicode_ci NOT NULL,
`tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
`version` int(11) NOT NULL,
`locktime` int(11) NOT NULL,
`block` char(64) COLLATE utf8_unicode_ci NOT NULL,
`confirmations` int(11) NOT NULL,
`time` int(11) NOT NULL,
`blocktime` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `tx` (`tx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10093 ;
-- --------------------------------------------------------
--
-- Table structure for table `tx_vin`
--
CREATE TABLE IF NOT EXISTS `tx_vin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
`tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
`vout` int(11) NOT NULL,
`sequence` bigint(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `tx_vout`
--
CREATE TABLE IF NOT EXISTS `tx_vout` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
`value` double NOT NULL,
`n` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10120 ;
-- --------------------------------------------------------
--
-- Table structure for table `tx_vout_addr`
--
CREATE TABLE IF NOT EXISTS `tx_vout_addr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
`address` char(34) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10120 ;
-- --------------------------------------------------------
--
-- Table structure for table `tx_vout_spk`
--
CREATE TABLE IF NOT EXISTS `tx_vout_spk` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_tx` char(64) COLLATE utf8_unicode_ci NOT NULL,
`asm` text COLLATE utf8_unicode_ci NOT NULL,
`hex` text COLLATE utf8_unicode_ci NOT NULL,
`req_sigs` int(11) NOT NULL,
`type` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10120 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;